You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.6KB

  1. FROM ubuntu:18.04 AS build
  2. #shell,rtmp,rtsp,rtsps,http,https,rtp
  3. EXPOSE 9000/tcp
  4. EXPOSE 1935/tcp
  5. EXPOSE 554/tcp
  6. EXPOSE 322/tcp
  7. EXPOSE 80/tcp
  8. EXPOSE 443/tcp
  9. EXPOSE 10000/udp
  10. EXPOSE 10000/tcp
  11. RUN apt-get update && \
  12. DEBIAN_FRONTEND="noninteractive" \
  13. apt-get install -y --no-install-recommends \
  14. build-essential \
  15. cmake \
  16. git \
  17. curl \
  18. vim \
  19. ca-certificates \
  20. tzdata \
  21. libssl-dev \
  22. libmysqlclient-dev \
  23. libx264-dev \
  24. libfaac-dev \
  25. libmp4v2-dev && \
  26. apt-get autoremove -y && \
  27. apt-get clean -y && \
  28. rm -rf /var/lib/apt/lists/*
  29. RUN mkdir -p /opt/media
  30. WORKDIR /opt/media
  31. RUN git clone --depth=1 https://github.com/xia-chu/ZLMediaKit && \
  32. cd ZLMediaKit && git submodule update --init --recursive && \
  33. mkdir -p build release/linux/Release/
  34. WORKDIR /opt/media/ZLMediaKit/build
  35. RUN cmake -DCMAKE_BUILD_TYPE=Release .. && \
  36. make
  37. FROM ubuntu:18.04
  38. LABEL maintainer "Gemfield <gemfield@civilnet.cn>"
  39. RUN apt-get update && \
  40. DEBIAN_FRONTEND="noninteractive" \
  41. apt-get install -y --no-install-recommends \
  42. vim \
  43. ca-certificates \
  44. tzdata \
  45. libssl-dev \
  46. libx264-dev \
  47. libfaac-dev \
  48. ffmpeg \
  49. libmp4v2-dev && \
  50. apt-get autoremove -y && \
  51. apt-get clean -y && \
  52. rm -rf /var/lib/apt/lists/*
  53. WORKDIR /opt/media/bin/
  54. COPY --from=build /opt/media/ZLMediaKit/release/linux/Release/MediaServer /opt/media/bin/MediaServer
  55. ENV PATH /opt/media/bin:$PATH
  56. CMD MediaServer