1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-12 11:21:52 +00:00
srs/trunk/Dockerfile

37 lines
1.2 KiB
Text
Raw Normal View History

2021-08-14 12:46:52 +00:00
FROM ossrs/srs:dev AS build
# Install depends tools.
RUN yum install -y gcc make gcc-c++ patch unzip perl git
# Build and install SRS.
2021-09-05 07:03:03 +00:00
COPY . /srs
2021-08-15 04:05:15 +00:00
WORKDIR /srs/trunk
2021-08-14 12:46:52 +00:00
RUN ./configure --jobs=2 && make -j2 && make install
# All config files for SRS.
RUN cp -R conf /usr/local/srs/conf
# The default index.html and srs-console.
RUN cp research/api-server/static-dir/index.html /usr/local/srs/objs/nginx/html/
RUN cp research/api-server/static-dir/favicon.ico /usr/local/srs/objs/nginx/html/
RUN cp research/players/crossdomain.xml /usr/local/srs/objs/nginx/html/
RUN cp -R research/console /usr/local/srs/objs/nginx/html/
RUN cp -R research/players /usr/local/srs/objs/nginx/html/
#RUN cp -R 3rdparty/signaling/www/demos /usr/local/srs/objs/nginx/html/
############################################################
# dist
############################################################
FROM centos:7 AS dist
# Expose ports for live streaming
EXPOSE 1935 1985 8080
2021-08-14 12:46:52 +00:00
# FFMPEG 4.1
COPY --from=build /usr/local/bin/ffmpeg /usr/local/srs/objs/ffmpeg/bin/ffmpeg
# SRS binary, config files and srs-console.
COPY --from=build /usr/local/srs /usr/local/srs
# Default workdir and command.
WORKDIR /usr/local/srs
CMD ["./objs/srs", "-c", "conf/srs.conf"]