ffmpeg is not available inside n8n docker container (Distroless issue)

Hi everyone,

I am running n8n in a Docker container using the official docker.n8n.io/n8nio/n8n:latest image. I need to use ffmpeg for video processing in my workflow.

Since the official image is “distroless”, I cannot install ffmpeg using apt-get or apk.

Hi @Vadim_007, welcome!
I think if you want to use ffmpeg on a distroless image, then you need to build your custom image for that. See this:

FROM alpine:latest AS alpine
FROM docker.n8n.io/n8nio/n8n:latest

COPY --from=alpine /sbin/apk /sbin/apk
COPY --from=alpine /usr/lib/libapk.so* /usr/lib/

USER root
RUN apk add --no-cache ffmpeg
USER node