fix dockerfile

This commit is contained in:
roman.nikolsky
2026-07-04 02:08:06 +03:00
parent af098e6ec4
commit b5dcb7dbdc
2 changed files with 4 additions and 18 deletions
+3 -17
View File
@@ -10,31 +10,17 @@ RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o ytdlp-navidrome .
# Stage 2: Install yt-dlp and ffmpeg
FROM alpine:latest AS tools
RUN apk add --no-cache \
python3 \
py3-pip \
ffmpeg \
ca-certificates
RUN pip3 install --break-system-packages yt-dlp
# Stage 3: Final image
# Stage 2: Final image
FROM alpine:latest
RUN apk add --no-cache \
ca-certificates \
ffmpeg \
python3 \
py3-pip \
libc6-compat
# Copy Python + packages from tools stage
COPY --from=tools /usr/lib/python3.12 /usr/lib/python3.12
COPY --from=tools /usr/bin/yt-dlp /usr/bin/yt-dlp
COPY --from=tools /usr/bin/ffmpeg /usr/bin/ffmpeg
COPY --from=tools /usr/bin/ffprobe /usr/bin/ffprobe
RUN pip3 install --break-system-packages yt-dlp
# Copy Go binary
COPY --from=builder /build/ytdlp-navidrome /usr/local/bin/ytdlp-navidrome