diff --git a/Dockerfile b/Dockerfile index 21c73e9..52b44b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,11 +24,15 @@ COPY --from=ui /usr/src/yt-dlp-webui/frontend /usr/src/yt-dlp-webui/frontend RUN CGO_ENABLED=0 GOOS=linux go build -o yt-dlp-webui # ----------------------------------------------------------------------------- -# dependencies ---------------------------------------------------------------- -FROM alpine:edge +# Runtime --------------------------------------------------------------------- +FROM alpine RUN apk update && \ -apk add ffmpeg yt-dlp ca-certificates curl wget psmisc +apk add ffmpeg ca-certificates curl wget gnutls && \ +RELEASE=$(curl --silent "https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') && \ +if [ $(apk --print-arch) == "aarch64" ]; then curl -L -o yt-dlp "https://github.com/yt-dlp/yt-dlp/releases/download/$RELEASE/yt-dlp_linux_aarch64"; else curl -L -o yt-dlp "https://github.com/yt-dlp/yt-dlp/releases/download/$RELEASE/yt-dlp_linux"; fi; && \ +chmod +x ./yt-dlp && \ +mv ./yt-dlp /usr/bin/yt-dlp VOLUME /downloads /config