From 2f1f742899c00caa86daee8b6a1bf14dcd9c072c Mon Sep 17 00:00:00 2001 From: Evan Fiordeliso Date: Sat, 15 Apr 2023 00:08:30 -0400 Subject: [PATCH] Update dockerfile to use args --- Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 78cef5f..9b255ea 100644 --- a/Dockerfile +++ b/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 @@ -9,11 +14,11 @@ RUN go install github.com/go-task/task/v3/cmd/task@latest \ && task build -FROM alpine:3.17 +FROM alpine:${ALPINE_VERSION} 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