FluidSynth 2.5 with TimGM6mb soundfont, FFmpeg, Python 3 with NumPy and pytest
694
FluidSynth with a General MIDI soundfont and FFmpeg on Alpine Linux, for rendering MIDI files to audio.
Docker Hub · Source · All images
| Base image | alpine:3.24.4 |
| Software | FluidSynth 2.5.4 (Alpine package) |
| Also included | TimGM6mb General MIDI soundfont (/usr/share/soundfonts/default.sf2, also in $SOUNDFONT), FFmpeg, Python 3 with NumPy, pytest and pip, bash, ShellCheck, Ruff 0.17.6 (pip) |
| User | fluidsynth (uid 1000) with passwordless doas (doas apk add ...) |
| Tags | latest, 2.5.4, 2.5.4-YYYYMMDD |
Run in an empty directory; the commands work on the files of the current directory, mounted as the home directory of the container. CI runs these commands to check that they work.
# open a shell, with the current directory as the home directory
docker run --rm -it -v .:/home/fluidsynth -w /home/fluidsynth aljazmc/fluidsynth-alpine
# render song.mid to song.wav with the bundled soundfont
docker run --rm -v .:/home/fluidsynth -w /home/fluidsynth aljazmc/fluidsynth-alpine fluidsynth -ni -F song.wav /usr/share/soundfonts/default.sf2 song.mid
# encode it to song.mp3 with FFmpeg
docker run --rm -v .:/home/fluidsynth -w /home/fluidsynth aljazmc/fluidsynth-alpine ffmpeg -i song.wav song.mp3
## docker-compose.yml file
services:
fluidsynth:
image: aljazmc/fluidsynth-alpine
user: ${UID:-1000}:${GID:-1000}
working_dir: /home/fluidsynth
volumes:
- .:/home/fluidsynth
- /home/$USER/.Xauthority:/home/fluidsynth/.Xauthority
- $XDG_RUNTIME_DIR:/run/user/1000
- /tmp/.X11-unix:/tmp/.X11-unix
- /var/lib/dbus/machine-id:/var/lib/dbus/machine-id
devices:
- /dev/dri:/dev/dri
- /dev/snd:/dev/snd
group_add:
- "992" # render group: stat -c %g /dev/dri/renderD128
- "44" # video group: stat -c %g /dev/dri/card0
- "29" # audio group: stat -c %g /dev/snd/controlC0
environment:
DISPLAY: $DISPLAY
HOME: /home/fluidsynth
XDG_RUNTIME_DIR: /run/user/1000
network_mode: host
## start container shell
docker compose run --rm fluidsynth sh -c "sh"
## render song.mid to song.mp3
docker compose run --rm fluidsynth sh -c "fluidsynth -ni -F song.wav /usr/share/soundfonts/default.sf2 song.mid && ffmpeg -i song.wav song.mp3"
render, video and audio groups (group_add) to use the GPU and the sound card. Without them, apps fall back to software rendering. The group ids differ between distributions: stat -c %g /dev/dri/renderD128 /dev/dri/card0 /dev/snd/controlC0.DISPLAY, /tmp/.X11-unix) and the host's PipeWire/PulseAudio (XDG_RUNTIME_DIR)./usr/share/soundfonts/default.sf2 (TimGM6mb).SOUNDFONT environment variable points to the default soundfont (/usr/share/soundfonts/default.sf2). Override it with -e SOUNDFONT=/path/to/soundfont.sf2.bash and findutils (GNU find) are included for bash scripts that use find -printf.latest: the newest build.2.5.4: the FluidSynth version in the image, e.g. aljazmc/fluidsynth-alpine:2.5.4. Use it to stay on a known version.2.5.4-YYYYMMDD: the same version, built on that date (UTC), e.g. 2.5.4-20261122. Every build gets its own tag that never moves, so use it where you need exactly the same image again.fluidsynth package, pinned with FLUIDSYNTH_VERSION in the Dockerfile (fluidsynth~2.5.4).The Dockerfile, the scripts and this README are part of aljazmc/dockerfiles, released under the MIT License.
The software in the image keeps its own license:
| Software | License | In the image |
|---|---|---|
| FluidSynth | LGPL-2.1-or-later | apk info --license fluidsynth |
Every other package keeps its license too: apk info --license <package> shows it on Alpine, /usr/share/doc/<package>/copyright on Debian.
Content type
Image
Digest
sha256:2521f0eea…
Size
210.5 MB
Last updated
2 days ago
docker pull aljazmc/fluidsynth-alpine