Full SDL2 and SDL3 development environment with build tools, extensions, OpenGL, and X11 support.
4.0K
Support: wischner.co.uk/support
wischner/gcc-x86_64-linux-sdl is a ready-to-use Ubuntu 22.04 Docker image for SDL-based Linux desktop development.
It combines the standard GCC/CMake toolchain with X11, Mesa/OpenGL, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, and SDL3 so you can build modern Linux game and multimedia projects in a reproducible environment.
Compile an SDL2 application:
docker run --rm \
-u $(id -u):$(id -g) \
-v "$PWD":/work -w /work \
wischner/gcc-x86_64-linux-sdl:latest \
bash -lc 'gcc -o game main.c $(pkg-config --cflags --libs sdl2 SDL2_image SDL2_mixer SDL2_ttf gl)'
Compile an SDL3 application:
docker run --rm \
-u $(id -u):$(id -g) \
-v "$PWD":/work -w /work \
wischner/gcc-x86_64-linux-sdl:latest \
bash -lc 'gcc -o game3 main.c $(pkg-config --cflags --libs sdl3)'
Interactive shell:
docker run --rm -it \
-u $(id -u):$(id -g) \
-v "$PWD":/work -w /work \
wischner/gcc-x86_64-linux-sdl:latest \
bash
To run an SDL application against your host X11 display:
docker run --rm -it \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v "$PWD":/work -w /work \
wischner/gcc-x86_64-linux-sdl:latest \
./build/game
wischner/gcc-x86_64-linux-x11 for a non-SDL Linux desktop/X11 base imageContributions are welcome. Please open an issue or pull request: https://github.com/wischner/docker-toolchains
Content type
Image
Digest
sha256:eefe8e323…
Size
482.7 MB
Last updated
about 2 months ago
docker pull wischner/gcc-x86_64-linux-sdl