I use Docker Swarm in an infrastructure with 3 VPSs, where we distribute services among workers, webhooks + mcp, and editors.
I did it like this and it worked.
docker exec -it --user root <container_name> sh
apk update && apk add ffmpeg
But if you need to restart the container, you have to run it again. I’d like something to make it already in the Docker Swarm image.