diff --git a/Dockerfile b/Dockerfile index 3834540..3bec514 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,11 +2,12 @@ FROM alpine:latest as build # Define version args -ARG SRT_VERSION=v1.4.2 -ARG SLS_VERSION=V1.4.8 +ARG SRT_VERSION=v1.5.3 +ARG SLS_VERSION=master # Install build dependencies RUN apk update +RUN apk upgrade RUN apk add --no-cache \ linux-headers \ alpine-sdk \ @@ -18,7 +19,7 @@ RUN apk add --no-cache \ # Clone projects WORKDIR /source RUN git clone --branch ${SRT_VERSION} https://github.com/Haivision/srt.git srt -RUN git clone --branch ${SLS_VERSION} https://github.com/Edward-Wu/srt-live-server.git sls +RUN git clone --branch ${SLS_VERSION} https://github.com/irlserver/irl-srt-server.git sls # Compile SRT WORKDIR /source/srt @@ -27,7 +28,9 @@ RUN make install # Compile SLS WORKDIR /source/sls -RUN make +RUN git submodule update --init +RUN cmake . -DCMAKE_BUILD_TYPE=Release +RUN make -j8 # Entry image FROM alpine:latest @@ -43,7 +46,7 @@ RUN apk update && \ # Copy SRT libraries COPY --from=build /usr/local/bin/srt-* /usr/local/bin/ -COPY --from=build /usr/local/lib64/libsrt* /usr/local/lib64/ +COPY --from=build /usr/local/lib/libsrt* /usr/local/lib/ # Copy SLS binary COPY --from=build /source/sls/bin/* /usr/local/bin/ @@ -55,5 +58,5 @@ WORKDIR /home/srt # Define entrypoint VOLUME /logs -EXPOSE 1935/udp -ENTRYPOINT ["sls", "-c", "/etc/sls/sls.conf"] +EXPOSE 8080 8181 1935/udp 1936/udp +ENTRYPOINT [ "srt_server", "-c", "/etc/sls/sls.conf"] diff --git a/README.md b/README.md index c9958c4..d81c669 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # srt-server-docker A Docker container for srt-live-server https://github.com/Edward-Wu/srt-live-server +Added docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..cc111b3 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: '3' +services: + srt: + image: ghcr.io/nerdcubed/srt-server-docker/srt-server:6c9570e + ports: + - "8100:8080/udp" + volumes: + - type: bind + source: /DATA/AppData/sls/sls.conf + target: /etc/sls/sls.conf