File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM python:3.13-alpine as base
1+ FROM python:3.13-slim as base
22
33FROM base as builder
44RUN mkdir /ffmpeg
55WORKDIR /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
922FROM base
1023COPY --from=builder /ffmpeg/bin/ffmpeg /usr/local/bin
You can’t perform that action at this time.
0 commit comments