Issue
Mendix Docker buildpack fails with the following error:
INFO: Selecting Mono Runtime: 5
Traceback (most recent call last):
File "/opt/mendix/buildpack/./compilation.py", line 76, in <module>
compilation_globals = call_buildpack_compilation()
File "/opt/mendix/buildpack/./compilation.py", line 61, in call_buildpack_compilation
return runpy.run_module("buildpack.stage", run_name="__main__")
File "/opt/mendix/buildpack/buildpack/core/mxbuild.py", line 25, in build_from_source
mono_location = mono.ensure_and_get_mono(...)
File "/opt/mendix/buildpack/buildpack/core/mono.py", line 50, in _compose_mono_dependency_name
raise Exception(
Exception: Only Ubuntu is supported at present, requested distribution: rhelEnvironment
Applications deployed with Docker
Cause
When an application is a source Mendix Package (MPK) file, a Modeler Project Repository (MPR) project directory, or a compressed Mendix Deployment Archive (MDA) file, it must be converted or compiled into a format supported by Cloud Foundry (CF) Buildpack. The build.py script performs this conversion by compiling the source into an extracted MDA format in the destination directory. If the build.py script is not executed before the container build, the build process attempts to compile the source directly, which is no longer supported by the CF buildpack for Mendix 8, 9, and 10 versions. This results in a build failure with the Mono dependency error.
Additionally, using unsupported branches, such as master instead of the maintained latest branch documentation will lead to this issue.
Solution/Workaround
Follow the validated Docker buildpack procedure for building from source.
- Use the maintained Docker buildpack documentation from the
latestbranch, not themasterbranch. -
Compile the source MPK file or MPR project directory, or compressed MDA file, into an extracted MDA format by running the
build.pyscript:/build.py --source <path-to-source> --destination <destination-dir> build-mda-dir -
After the
build.pyscript completes, build the Docker image from the generated destination directory:docker build --build-arg BUILDER_ROOTFS_IMAGE=mendix-rootfs:builder --build-arg ROOTFS_IMAGE=mendix-rootfs:app --tag <image-tag> <destination-dir>
Internal information related
233939
Additional information
Mendix documentation: Compile MDA for Mendix Docker Buildpack
0 Comments