-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (24 loc) · 591 Bytes
/
Dockerfile
File metadata and controls
36 lines (24 loc) · 591 Bytes
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
# golang image
FROM golang:latest AS build
# set work dir
WORKDIR /app
# copy the source files
COPY . .
# compile linux only
ENV GOOS=linux
ENV CGO_ENABLED=0
# build the binary with debug information removed
RUN go build -ldflags '-w -s' -a -installsuffix cgo -o server
FROM jrottenberg/ffmpeg:8-alpine AS ffmpeg
# set work dir
WORKDIR /app
# copy our static linked library
COPY --from=build /app/server .
# copy player
COPY --from=build /app/player ./player
ENV OUTPUT=/data
# tell we are exposing our service
EXPOSE 8080 8081 8082 8083
ENTRYPOINT []
# run it!
CMD ["./server"]