1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-01-30 23:13:00 +00:00
ghostream/Dockerfile

21 lines
865 B
Docker
Raw Normal View History

2020-09-29 14:22:56 +02:00
# Install dependencies then build ghostream
FROM debian:bullseye-slim AS build_base
RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates \
gcc golang libc6-dev libsrt1 libsrt-openssl-dev musl-dev
2020-09-21 17:29:50 +02:00
WORKDIR /code
2020-09-27 21:26:06 +02:00
COPY go.* ./
2020-09-28 17:47:33 +02:00
RUN go mod download && go get github.com/markbates/pkger/cmd/pkger
# Don't copy all to save time each time we touch a non-code file
COPY auth/ internal/ stream/ web/ go.mod go.sum main.go ./
RUN PATH=/root/go/bin:$PATH go generate && go build -o ./out/ghostream .
2020-09-21 17:29:50 +02:00
# Production image
FROM debian:bullseye-slim
RUN apt-get update && apt-get install -y ffmpeg libsrt1 musl
2020-09-21 17:29:50 +02:00
COPY --from=build_base /code/out/ghostream /app/ghostream
2020-09-27 21:44:12 +02:00
WORKDIR /app
# 9710 (UDP) for SRT, 8080 for Web, 2112 for monitoring and 10000-10005 (UDP) for WebRTC
2020-09-29 15:31:08 +02:00
EXPOSE 9710/udp 8080 2112 10000-10005/udp
2020-09-27 20:25:42 +02:00
CMD ["/app/ghostream"]