forked from ravenium/srt-live-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (31 loc) · 1009 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# build stage
FROM alpine:latest as build
RUN apk update &&\
apk upgrade &&\
apk add --no-cache linux-headers alpine-sdk cmake tcl openssl-dev zlib-dev
WORKDIR /tmp
RUN git clone https://github.com/Edward-Wu/srt-live-server.git
RUN git clone https://github.com/Haivision/srt.git
WORKDIR /tmp/srt
RUN ./configure && make && make install
WORKDIR /tmp/srt-live-server
RUN make
# final stage
FROM alpine:latest
ENV LD_LIBRARY_PATH /lib:/usr/lib:/usr/local/lib64
RUN apk update &&\
apk upgrade &&\
apk add --no-cache openssl libstdc++ &&\
mkdir /etc/sls /logs &&\
cd /etc/sls &&\
wget https://raw.githubusercontent.com/mach7/srt-live-server/master/sls.conf &&\
apk add nano
COPY --from=build /usr/local/bin/srt-* /usr/local/bin/
COPY --from=build /usr/local/lib64/libsrt* /usr/local/lib64/
COPY --from=build /tmp/srt-live-server/bin/* /usr/local/bin/
#COPY sls.conf /etc/sls/
VOLUME /logs
EXPOSE 1935/udp
USER root
#WORKDIR /home/srt
ENTRYPOINT [ "sls", "-c", "/etc/sls/sls.conf"]