Installing ffmpeg in Dockerfile

Hi!

All day long I can’t install ffmpeg for n8n. Error: Command failed: ffmpeg -version /bin/sh: ffmpeg: not found

My files:

FROM docker.n8n.io/n8nio/n8n:1.95.3

USER root

RUN apk add --no-cache ffmpeg

RUN chown -R node:node /data

USER node

ENV N8N_DISABLE_PRODUCTION_MAIN_PROCESS=false
ENV N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
ENV N8N_RUNNERS_ENABLED=true
ENV DB_TYPE=sqlite
ENV DB_SQLITE_DATABASE=/data/database.sqlite
ENV N8N_USER_FOLDER=/data

CMD ["n8n", "start"]

# amvera.yml
version: null
meta:
  environment: docker
  toolchain:
    name: docker
    version: latest
build:
  dockerfile: Dockerfile
  skip: false 
run:
  persistenceMount: /data
  containerPort: 5678 

Configuration settings on the screenshot

what do I need to change to make ffmpeg work?

I may assume that the user node doesn’t have permission to run the ffmpeg command, as it was installed as root user

Check NCA Toolkit, install as docker and they have tutorials how to use ith with N8N