A model-agnostic, version-pinned Docker image that compiles any Mendix 8.x project (
.mpr) into a deployable.mda— and runsmx check— with nothing on the host but Docker. The Mendix build toolchain (mxbuild+mx) is pulled from the official Mendix CDN at build time; no Studio Pro install, no committed binaries.
This is the build companion to the mendix-8 runtime crate. The build
crate produces the .mda; the runtime crate runs it.
The AIDE pipeline compiles models with mxbuild driven from a bind-mounted Studio
Pro install. That requires a licensed modeler on the host. This crate makes the
toolchain self-contained and version-pinned: one image per Mendix major, the
matching mxbuild fetched from cdn.mendix.com at docker build — so a CI runner
or a contributor with only Docker can compile a Mendix 8 app without Studio Pro.
| Studio Pro on host | aide-mxtools (bind-mount) | This build crate | |
|---|---|---|---|
| Needs Studio Pro installed | yes | yes (modeler bind-mounted) | no |
| Toolchain source | local install | local install | CDN at build |
| Version pinning | manual | manual | one image per version |
| Runs in plain CI | no | partial | yes |
| Tag | Pins | Use |
|---|---|---|
ontologylabs/mendix-mxbuild:8.18.35.97 |
Exact version (immutable) | Reproducible CI |
ontologylabs/mendix-mxbuild:8 |
Latest 8.x in this crate | Dev, demo |
cd crates/mendix-8/build
docker build \
--platform linux/amd64 \
--build-arg MENDIX_VERSION=8.18.35.97 \
-t ontologylabs/mendix-mxbuild:8.18.35.97 .
# mxbuild + mx are pulled from cdn.mendix.com/runtime/mxbuild-8.18.35.97.tar.gz at build.# /path/to/project contains App.mpr
docker run --rm \
--platform linux/amd64 \
-v /path/to/project:/workspace \
ontologylabs/mendix-mxbuild:8.18.35.97 \
build /workspace/App.mpr
# → writes /path/to/project/App.mdaThen run it with the runtime crate:
unzip /path/to/project/App.mda -d /path/to/project/app
cd ../ # the mendix-8 runtime crate
docker compose -f tests/docker-compose.smoke.yml up # or your own composedocker run --rm -v /path/to/project:/workspace \
ontologylabs/mendix-mxbuild:8.18.35.97 \
check /workspace/App.mpr
# exit 0 = clean · 1 = errors · 2 = warnings onlybuild.sh supplies the toolchain paths mxbuild needs unless you pass them:
--java-home/--java-exe-path→ the baked JDK ($JAVA_HOME)--gradle-home→ the toolchain's bundled Gradle--loose-version-check→ tolerate patch drift between toolchain and model--output=/workspace/<App>.mda→ default output beside the.mpr
Pass any of these explicitly to override.
- Runs as root by design. A single-shot build container, not a service. Root
avoids the bind-mount uid mismatch that would block writing the
.mdaback into your mounted/workspace. On Linux, pass--user $(id -u)if you want host-uid-owned output; the entrypoint re-creates the Mendix settings dir under the resulting$HOME. .NETwhitelist (MX 11 origin). mxbuild creates settings under$HOME/.local/share/Mendixand FailFast-rejects creating that path itself; the image pre-creates it. (Same fix as the AIDE aide-mxtools image.)- amd64 emulation. On Apple Silicon,
mxbuildruns x86_64 under emulation. Enable Colima Rosetta (colima start --vm-type vz --vz-rosetta) for speed; a hung emulated build is the classic symptom of Rosetta being off. - No Mendix binary is committed. The toolchain is fetched from the CDN at build,
on your licensed machine (D-DOCKER-LIB-002). See repo
guard.sh. - Mendix 8 is out of standard support. The default
8.18.35.97mxbuild is CDN-hosted. For an older MX8 patch the CDN doesn't host, obtain the toolchain via the Mendix portal and overrideMXBUILD_CDN_BASE— see../PORTAL-DOWNLOAD.md.
See provenance.yaml for the exact CDN source and
versions.yaml for verified versions.