Dockerfile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. FROM ossrs/srs:dev AS build
  2. # Install depends tools.
  3. RUN yum install -y gcc make gcc-c++ patch unzip perl git
  4. # Build and install SRS.
  5. COPY . /srs
  6. WORKDIR /srs/trunk
  7. RUN ./configure --jobs=2 && make -j2 && make install
  8. # All config files for SRS.
  9. RUN cp -R conf /usr/local/srs/conf
  10. # The default index.html and srs-console.
  11. RUN cp research/api-server/static-dir/index.html /usr/local/srs/objs/nginx/html/
  12. RUN cp research/api-server/static-dir/favicon.ico /usr/local/srs/objs/nginx/html/
  13. RUN cp research/players/crossdomain.xml /usr/local/srs/objs/nginx/html/
  14. RUN cp -R research/console /usr/local/srs/objs/nginx/html/
  15. RUN cp -R research/players /usr/local/srs/objs/nginx/html/
  16. #RUN cp -R 3rdparty/signaling/www/demos /usr/local/srs/objs/nginx/html/
  17. ############################################################
  18. # dist
  19. ############################################################
  20. FROM centos:7 AS dist
  21. # Expose ports for live streaming
  22. EXPOSE 1935 1985 8080
  23. # FFMPEG 4.1
  24. COPY --from=build /usr/local/bin/ffmpeg /usr/local/srs/objs/ffmpeg/bin/ffmpeg
  25. # SRS binary, config files and srs-console.
  26. COPY --from=build /usr/local/srs /usr/local/srs
  27. # Default workdir and command.
  28. WORKDIR /usr/local/srs
  29. CMD ["./objs/srs", "-c", "conf/srs.conf"]