Skip to content

Commit b25a373

Browse files
committed
fix dockerfile
1 parent e32ceee commit b25a373

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

Dockerfile

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1-
FROM python:3.13-alpine as base
1+
FROM python:3.13-slim as base
22

33
FROM base as builder
44
RUN mkdir /ffmpeg
55
WORKDIR /ffmpeg
6-
RUN wget https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz
7-
RUN tar -xf ffmpeg-master-latest-linux64-gpl.tar.xz -C /ffmpeg --strip-components=1
6+
7+
# Install wget and xz-utils for downloading and extracting FFmpeg
8+
RUN apt-get update && apt-get install -y wget xz-utils && rm -rf /var/lib/apt/lists/*
9+
10+
# Detect architecture and download appropriate FFmpeg build
11+
RUN ARCH=$(uname -m) && \
12+
if [ "$ARCH" = "x86_64" ]; then \
13+
FFMPEG_ARCH="linux64"; \
14+
elif [ "$ARCH" = "aarch64" ]; then \
15+
FFMPEG_ARCH="linuxarm64"; \
16+
else \
17+
echo "Unsupported architecture: $ARCH" && exit 1; \
18+
fi && \
19+
wget https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-${FFMPEG_ARCH}-gpl.tar.xz && \
20+
tar -xf ffmpeg-master-latest-${FFMPEG_ARCH}-gpl.tar.xz -C /ffmpeg --strip-components=1
821

922
FROM base
1023
COPY --from=builder /ffmpeg/bin/ffmpeg /usr/local/bin

0 commit comments

Comments
 (0)