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

18 lines
707 B
Docker
Raw Permalink Normal View History

2020-09-29 14:22:56 +02:00
# Install dependencies then build ghostream
FROM golang:1.15-alpine AS build_base
RUN apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/edge/community/ gcc libsrt-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
COPY . .
RUN go generate && go build -o ./out/ghostream .
2020-09-21 17:29:50 +02:00
# Production image
FROM alpine:3.12
RUN apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/edge/community/ ffmpeg libsrt
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
2020-10-13 18:01:20 +02:00
# 2112 for monitoring, 8023 for Telnet, 8080 for Web, 9710 for SRT, 10000-10005 (UDP) for WebRTC
EXPOSE 2112 8023 8080 9710/udp 10000-10005/udp
2020-09-27 20:25:42 +02:00
CMD ["/app/ghostream"]