fix dockerfile
This commit is contained in:
+3
-17
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user