Update dockerfile to use args
This commit is contained in:
parent
76cdf0ae3a
commit
2f1f742899
11
Dockerfile
11
Dockerfile
|
@ -1,4 +1,9 @@
|
||||||
FROM golang:1.20-alpine3.17 as builder
|
ARG GO_VERSION="1.20"
|
||||||
|
ARG ALPINE_VERSION="3.17"
|
||||||
|
ARG YTDLP_VERSION="2023.03.04"
|
||||||
|
ARG FFMPEG_VERSION="5.1.3"
|
||||||
|
|
||||||
|
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} as builder
|
||||||
|
|
||||||
WORKDIR /usr/src/ytdl-web
|
WORKDIR /usr/src/ytdl-web
|
||||||
|
|
||||||
|
@ -9,11 +14,11 @@ RUN go install github.com/go-task/task/v3/cmd/task@latest \
|
||||||
&& task build
|
&& task build
|
||||||
|
|
||||||
|
|
||||||
FROM alpine:3.17
|
FROM alpine:${ALPINE_VERSION}
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apk add --no-cache yt-dlp==2023.03.04 ffmpeg==5.1.3
|
RUN "apk add --no-cache yt-dlp==${YTDLP_VERSION} ffmpeg==${FFMPEG_VERSION}"
|
||||||
|
|
||||||
COPY --from=builder /usr/src/ytdl-web/ytdl-web ./ytdl-web
|
COPY --from=builder /usr/src/ytdl-web/ytdl-web ./ytdl-web
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue