forked from m1k1o/go-transcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (29 loc) · 731 Bytes
/
Copy pathDockerfile
File metadata and controls
36 lines (29 loc) · 731 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
#
# STAGE 1: build executable binary
#
FROM golang:1.17-alpine as builder
WORKDIR /app
#
# build server
COPY . .
RUN go get -v -t -d .; \
CGO_ENABLED=0 go build -o go-transcode
#
# STAGE 2: build a small image
#
FROM alpine:edge
WORKDIR /app
#
# install dependencies
RUN apk add --no-cache bash ffmpeg
#
# install vdpau dependencies
RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories; \
apk update; \
apk add --no-cache bash ffmpeg libva-utils libva-vdpau-driver libva-intel-driver intel-media-driver mesa-va-gallium
COPY --from=builder /app/go-transcode go-transcode
COPY profiles profiles
EXPOSE 8080
ENV TRANSCODE_BIND=:8080
ENTRYPOINT [ "./go-transcode" ]
CMD [ "serve" ]