-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
69 lines (51 loc) · 2.28 KB
/
Dockerfile
File metadata and controls
69 lines (51 loc) · 2.28 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM alexanderwagnerdev/alpine:builder AS sls-builder
WORKDIR /tmp
RUN apk update && \
apk upgrade && \
apk add --no-cache linux-headers alpine-sdk cmake tcl openssl-dev zlib-dev spdlog spdlog-dev sqlite-dev && \
rm -rf /var/cache/apk/*
RUN git clone -b v0.40.0 https://github.com/yhirose/cpp-httplib.git cpp-httplib && \
cp /tmp/cpp-httplib/httplib.h /usr/include/ && \
rm -rf /tmp/cpp-httplib
RUN git clone -b master https://github.com/OpenIRL/srt.git srt && \
cd srt && \
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_SHARED=ON . && \
make -j$(nproc) && \
make install
RUN git clone -b 1.5.1 https://github.com/OpenIRL/srt-live-server.git srt-live-server && \
cd srt-live-server && \
make -j$(nproc)
FROM alexanderwagnerdev/alpine:builder AS srtla-builder
WORKDIR /tmp
RUN apk update && \
apk upgrade && \
apk add --no-cache linux-headers alpine-sdk cmake tcl openssl-dev zlib-dev spdlog spdlog-dev && \
rm -rf /var/cache/apk/*
RUN git clone -b next https://github.com/OpenIRL/srtla.git srtla && \
cd srtla && \
git submodule update --init --recursive && \
cmake -DCMAKE_BUILD_TYPE=Release \
-DENABLE_SHARED=ON . && \
make -j$(nproc)
FROM alexanderwagnerdev/alpine:latest
RUN apk update && \
apk upgrade && \
apk add --no-cache openssl libstdc++ supervisor coreutils procps spdlog perl sqlite && \
rm -rf /var/cache/apk/*
RUN adduser -D -u 3001 -s /bin/sh sls && \
adduser -D -u 3002 -s /bin/sh srtla
COPY --from=srtla-builder /tmp/srtla/srtla_rec /usr/local/bin
COPY --from=sls-builder /tmp/srt-live-server/bin /usr/local/bin
COPY --from=sls-builder /usr/local/bin/srt-* /usr/local/bin
COPY --from=sls-builder /usr/local/lib/libsrt* /usr/local/lib
COPY --from=sls-builder /usr/include/httplib.h /usr/include/
COPY --chmod=755 bin/logprefix /bin/logprefix
COPY conf/sls.conf /etc/sls/
COPY conf/supervisord.conf /etc/supervisord.conf
RUN mkdir -p /etc/sls /var/lib/sls /tmp/sls && \
chmod 755 /etc/sls /var/lib/sls /tmp/sls && \
chmod 666 /etc/sls/sls.conf
EXPOSE 4000/udp 4001/udp 5000/udp 8080/tcp
CMD ["/usr/bin/supervisord", "--nodaemon", "--configuration", "/etc/supervisord.conf"]