mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Use a multistage build for the docker transcoder
This commit is contained in:
parent
7309a435c5
commit
f1c3844bd3
@ -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
|
RUN apk add --no-cache build-base ffmpeg libmediainfo-dev
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
@ -6,5 +6,10 @@ RUN go mod download
|
|||||||
COPY . .
|
COPY . .
|
||||||
RUN go build -o ./transcoder
|
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
|
EXPOSE 7666
|
||||||
CMD ./transcoder
|
CMD ./transcoder
|
||||||
|
Loading…
x
Reference in New Issue
Block a user