Skip to content

Commit 4f3c207

Browse files
committed
feat: streamline ffmpeg installation in Dockerfile by copying from static image
1 parent 2dc0075 commit 4f3c207

1 file changed

Lines changed: 8 additions & 13 deletions

File tree

config/n8n-ffmpeg/Dockerfile

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
ARG N8N_VERSION=latest
2+
FROM mwader/static-ffmpeg:7.1.1 AS ffmpeg
3+
24
FROM n8nio/n8n:${N8N_VERSION}
35

46
USER root
57

6-
RUN set -eux; \
7-
if command -v apk >/dev/null 2>&1; then \
8-
apk add --no-cache ffmpeg; \
9-
elif command -v apt-get >/dev/null 2>&1; then \
10-
apt-get update; \
11-
apt-get install -y --no-install-recommends ffmpeg; \
12-
rm -rf /var/lib/apt/lists/*; \
13-
else \
14-
echo "Unsupported n8n base image: no apk or apt-get found" >&2; \
15-
exit 1; \
16-
fi; \
17-
command -v ffmpeg; \
18-
ffmpeg -hide_banner -version
8+
COPY --from=ffmpeg /ffmpeg /usr/local/bin/ffmpeg
9+
COPY --from=ffmpeg /ffprobe /usr/local/bin/ffprobe
10+
11+
RUN chmod 0755 /usr/local/bin/ffmpeg /usr/local/bin/ffprobe \
12+
&& /usr/local/bin/ffmpeg -hide_banner -version \
13+
&& /usr/local/bin/ffprobe -hide_banner -version
1914

2015
USER node

0 commit comments

Comments
 (0)