-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 710 Bytes
/
Dockerfile
File metadata and controls
31 lines (21 loc) · 710 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
FROM golang:1.25-alpine AS builder
WORKDIR /go/src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build \
-trimpath \
-ldflags="-s -w" \
-o /go/bin/ffmpeg-api \
cmd/main.go
FROM jrottenberg/ffmpeg:8.0-scratch AS ffmpeg
FROM scratch
COPY --from=ffmpeg /bin /bin
COPY --from=ffmpeg /lib /lib
COPY --from=ffmpeg /share /share
COPY --from=ffmpeg /usr/share/fonts /usr/share/fonts
COPY --from=ffmpeg /usr/share/fontconfig /usr/share/fontconfig
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /go/bin/ffmpeg-api /usr/local/bin/ffmpeg-api
EXPOSE 8080
ENTRYPOINT ["ffmpeg-api"]