qt-wasm-builder
Qt WASM builder Docker images, with full tooling for building complex Qt WebAssembly applications.
791
Production-ready Qt WASM builder Docker images based on Alpine Linux, with full tooling for building complex Qt WebAssembly applications.
wasm_singlethread and wasm_multithreadqt6-qtbase-dev (moc, rcc, uic)CMAKE_PREFIX_PATHlinux/amd64 and linux/arm64| Variant | Qt Arch | Use Case |
|---|---|---|
singlethread | wasm_singlethread | Standard WASM apps |
multithread | wasm_multithread | Apps needing pthreads/WASM threads |
Images are published to both Docker Hub and GitHub Container Registry.
docker pull anaselgarhy/qt-wasm-builder:singlethread
docker pull anaselgarhy/qt-wasm-builder:multithread
docker pull ghcr.io/0x61nas/qt-wasm-builder:singlethread
docker pull ghcr.io/0x61nas/qt-wasm-builder:multithread
Tags follow the format: <variant> for the latest, or <variant>-<qt semver>-alpine<semver>-<rev>.
docker build --build-arg VARIANT=singlethread -t qt-wasm-builder:singlethread .
docker build --build-arg VARIANT=multithread -t qt-wasm-builder:multithread .
docker build \
--build-arg VARIANT=singlethread \
--build-arg QT_VER=6.11.3 \
--build-arg EMSDK_VER=4.0.9 \
-t qt-wasm-builder:custom .
docker run --privileged --rm tonistiigi/binfmt --install arm64
docker buildx build --platform linux/arm64 \
--build-arg VARIANT=singlethread \
-t qt-wasm-builder:singlethread-arm64 \
--load .
docker run --rm -v $(pwd):/app qt-wasm-builder:singlethread \
cmake -B build -S . -G Ninja
docker run --rm -v $(pwd):/app qt-wasm-builder:singlethread \
emcc main.cpp -o output.js -s WASM=1
# Build and test on amd64
./test-amd64.sh
# Build and test on arm64 (requires QEMU)
./test-aarch64.sh
| Component | Details |
|---|---|
| Base OS | Alpine Linux 3.23.4 (musl-based) |
| emsdk | v4.0.7, installed at /opt/emsdk |
| Qt WASM | v6.11.1, installed via aqtinstall at /opt/Qt/6.11.1/wasm_* |
| Host Qt tools | Alpine qt6-qtbase-dev package (moc, rcc, uic live at /usr/lib/qt6/libexec/) |
| wasm-opt | From Alpine binaryen package |
| wabt | Prebuilt binaries from GitHub releases (x86_64 /usr/local/bin/) |
| Entrypoint | /usr/local/bin/entrypoint.sh — sources emsdk, sets CMAKE_PREFIX_PATH |
| Working dir | /app |
| glibc compat | gcompat + libstdc++ provides glibc ABI for emsdk's prebuilt LLVM/node/binaryen on musl |
Qt 6.11 targets emscripten 4.0.7. The prebuilt Qt WASM binaries from aqtinstall are compiled against that emscripten version. Running with a different emscripten version may cause ABI issues — this image pins both to matching versions.
Host Qt tools (moc/rcc/uic) come from Alpine's qt6-qtbase-dev package. A minor version mismatch with the WASM target version is acceptable for code-generation tools.
This project is provided under the MIT license. Qt itself is licensed under LGPLv3 / GPLv3 / commercial licenses. Emscripten is MIT-licensed.
Content type
Image
Digest
sha256:4e54fb460…
Size
903.9 MB
Last updated
about 1 month ago
docker pull anaselgarhy/qt-wasm-builder:multithread-6.11.1-alpine3.24.1-r1