2020-09-29 12:22:56 +00:00
|
|
|
# Install dependencies then build ghostream
|
2020-10-01 07:29:25 +00:00
|
|
|
FROM golang:1.15-alpine AS build_base
|
2020-10-01 07:40:37 +00:00
|
|
|
RUN apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/edge/community/ gcc libsrt-dev musl-dev
|
2020-09-21 15:29:50 +00:00
|
|
|
WORKDIR /code
|
2020-09-27 19:26:06 +00:00
|
|
|
COPY go.* ./
|
2020-09-28 15:47:33 +00:00
|
|
|
RUN go mod download && go get github.com/markbates/pkger/cmd/pkger
|
2020-09-30 21:01:45 +00:00
|
|
|
COPY . .
|
2020-10-01 07:29:25 +00:00
|
|
|
RUN go generate && go build -o ./out/ghostream .
|
2020-09-21 15:29:50 +00:00
|
|
|
|
|
|
|
# Production image
|
2020-10-01 07:29:25 +00:00
|
|
|
FROM alpine:3.12
|
2020-10-03 23:34:02 +00:00
|
|
|
RUN apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/edge/community/ ffmpeg libsrt
|
2020-09-21 15:29:50 +00:00
|
|
|
COPY --from=build_base /code/out/ghostream /app/ghostream
|
2020-09-27 19:44:12 +00:00
|
|
|
WORKDIR /app
|
2020-10-13 16:01:20 +00: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 18:25:42 +00:00
|
|
|
CMD ["/app/ghostream"]
|