mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-06-04 20:36:14 +00:00
Use a multistage build for the docker transcoder
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.21-alpine
|
||||
FROM golang:1.21-alpine as build
|
||||
RUN apk add --no-cache build-base ffmpeg libmediainfo-dev
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
@@ -6,5 +6,10 @@ RUN go mod download
|
||||
COPY . .
|
||||
RUN go build -o ./transcoder
|
||||
|
||||
FROM alpine
|
||||
RUN apk add --no-cache build-base ffmpeg libmediainfo-dev
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/transcoder /app/transcoder
|
||||
|
||||
EXPOSE 7666
|
||||
CMD ./transcoder
|
||||
|
||||
Reference in New Issue
Block a user