<-- Back

Failed to build Mendix app due to mismatching runtime and base image media types in Mendix on Kubernetes

Issue

Building a Mendix on Kubernetes app fails and the following error is logged:

{"level":"error","msg":"Failed to build mendix app, failed to append layer to base image mismatching runtime image media type application/vnd.docker.distribution.manifest.v2+json and base image media type application/vnd.oci.image.manifest.v1+json","time":"<date>"}

The build stops before the app image can be produced, and the deployment cannot be completed.

Environment

Applications hosted in Mendix on Kubernetes

Cause

The build process attempts to combine two different image manifest standards: the Docker format (application/vnd.docker.distribution.manifest.v2+json) and the OCI (Open Container Initiative) format (application/vnd.oci.image.manifest.v1+json). Mendix supports OCI compatible registries, so when the runtime image and the configured base image use different manifest media types, the layer cannot be appended and the build fails.

Solution/Workaround

Align both images on the OCI manifest format so the build process can append the layer successfully as follows:

  1. Verify the media types reported in the error message to identify which image uses the Docker manifest format and which uses the OCI manifest format.
  2. Convert the base image to the OCI format, for example by using skopeo copy --format oci.
  3. Push the converted base image to the registry used by the build.
  4. Confirm that the Runtime Base Image value configured for the environment points to the OCI-formatted image and includes the tag matching the app's Mendix runtime version.
  5. Retry the build and confirm that the app image is created successfully.

Internal information related

  • 289136

Additional information

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.