mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Support Github Actions
This commit is contained in:
parent
b8177ff2fb
commit
c2b133bd07
2 changed files with 111 additions and 0 deletions
36
trunk/Dockerfile
Normal file
36
trunk/Dockerfile
Normal file
|
@ -0,0 +1,36 @@
|
|||
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.
|
||||
COPY . /trunk
|
||||
WORKDIR /trunk
|
||||
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 streaming @see https://github.com/ossrs/srs#ports
|
||||
EXPOSE 1935 1985 8080 8000/udp 10080/udp
|
||||
|
||||
# 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"]
|
Loading…
Add table
Add a link
Reference in a new issue