{"id":48890607,"url":"https://github.com/mendix/docker-mendix-buildpack","last_synced_at":"2026-04-16T07:36:18.431Z","repository":{"id":14801751,"uuid":"76463132","full_name":"mendix/docker-mendix-buildpack","owner":"mendix","description":"Build and Run Mendix in Docker","archived":false,"fork":false,"pushed_at":"2026-02-05T16:31:23.000Z","size":313,"stargazers_count":95,"open_issues_count":63,"forks_count":128,"subscribers_count":21,"default_branch":"master","last_synced_at":"2026-02-06T02:28:22.215Z","etag":null,"topics":["docker","mendix-application","mendix-buildpack"],"latest_commit_sha":null,"homepage":"https://www.mendix.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mendix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-12-14T13:43:40.000Z","updated_at":"2025-11-10T21:49:34.000Z","dependencies_parsed_at":"2024-05-17T12:34:34.193Z","dependency_job_id":"1dfa11e9-b321-4abd-ac99-6eec70e4077a","html_url":"https://github.com/mendix/docker-mendix-buildpack","commit_stats":null,"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"purl":"pkg:github/mendix/docker-mendix-buildpack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendix%2Fdocker-mendix-buildpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendix%2Fdocker-mendix-buildpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendix%2Fdocker-mendix-buildpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendix%2Fdocker-mendix-buildpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mendix","download_url":"https://codeload.github.com/mendix/docker-mendix-buildpack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendix%2Fdocker-mendix-buildpack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31876781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","mendix-application","mendix-buildpack"],"created_at":"2026-04-16T07:36:17.825Z","updated_at":"2026-04-16T07:36:18.423Z","avatar_url":"https://github.com/mendix.png","language":"Python","readme":"**🚨⚠️🚧 Warning** The `master` branch is a legacy branch intended for backwards compatibility with existing CI/CD pipelines.\nTo get the latest supported version, please use the [latest](https://github.com/mendix/docker-mendix-buildpack/tree/latest) branch instead.\n\n# Docker Mendix Buildpack\n\n![Test status](https://github.com/mendix/docker-mendix-buildpack/workflows/Test/badge.svg)\n\nThe Mendix Buildpack for Docker (aka docker-mendix-buildpack) is an example project you can use to build and run your Mendix Application in a [Docker](https://www.docker.com/) container.\n\n## Try a sample mendix application\n\nOpen a terminal and run the following code:\n\n\u003e **🚨⚠️🚧 Important note**: always provide `\u003cTAG\u003e` value to guarantee consistent builds. List of tags is available [here](https://github.com/mendix/docker-mendix-buildpack/tags).\n\n```\ngit clone --branch \u003cTAG\u003e --config core.autocrlf=false https://github.com/mendix/docker-mendix-buildpack\ncd docker-mendix-buildpack\nmake get-sample\nmake build-image\nmake run-container\n```\n\nYou can now open your browser [http://localhost:8080]([http://localhost:8080])\n\n## Uses cases scenarios:\n\nThis project is a goto reference for the following scenarios :\n\n1. Build and run a Mendix Application on your own docker set up\n2. Build the Docker Image of your Mendix application, push to a container repository and run it.\n\n## Getting started\n\n### Requirements\n\n* Docker 17.05 (Installation [here](https://docs.docker.com/engine/installation/))\n  * Earlier Docker versions are no longer compatible because they don't support multistage builds.\n    To use Docker versions below 17.05, download an earlier Mendix Docker Buildpack release, such as [v2.3.2](https://github.com/mendix/docker-mendix-buildpack/releases/tag/v2.3.2)\n* For preparing, a local installation of wget (for macOS)\n* For local testing, make sure you can run the [docker-compose command](https://docs.docker.com/compose/install/)\n\n## Usage\n\n### Compilation\n\nBefore running the container, it is necessary to build the image with your application. This buildpack contains Dockerfile with a script that will compile your application using [cf-mendix-buildpack](https://github.com/mendix/cf-mendix-buildpack/).\n\n```\ndocker build \n  --build-arg BUILD_PATH=\u003cmendix-project-location\u003e \\\n  --build-arg ROOTFS_IMAGE=\u003croot-fs-image-tag\u003e \\\n  --build-arg BUILDER_ROOTFS_IMAGE=\u003croot-fs-image-tag\u003e \\\n  --build-arg CF_BUILDPACK=\u003ccf-buildpack-version\u003e \\\n  --tag mendix/mendix-buildpack:v1.2 .\n```\n\nFor build you can provide next arguments:\n\n- **BUILD_PATH** indicates where the application model is located. It is a root directory of an unzipped .MDA or .MPK file. In the latter case, this is the directory where your .MPR file is located. Must be within [build context](https://docs.docker.com/engine/reference/commandline/build/#extended-description). Defaults to `./project`.\n- **ROOTFS_IMAGE** is a type of rootfs image. Defaults to `mendix/rootfs:ubi8` (Red Hat Universal Base Image 8). To use Ubuntu 18.04, change this to `mendix/rootfs:bionic`. It's also possible to use a custom rootfs image as described in [Advanced feature: full-build](#advanced-feature-full-build).\n- **BUILDER_ROOTFS_IMAGE** is a type of rootfs image used for downloading the Mendix app dependencies and compiling the Mendix app from source. Defaults to `mendix/rootfs:bionic`. It's also possible to use a custom rootfs image as described in [Advanced feature: full-build](#advanced-feature-full-build).\n- **CF_BUILDPACK** is a version of CloudFoundry buildpack. Defaults to `v4.30.14`. For stable pipelines, it's recommended to use a fixed version from **v4.30.14** and later. CloudFoundry buildpack versions below **v4.30.14** are not supported.\n- **EXCLUDE_LOGFILTER** will exclude the `mendix-logfilter` binary from the resulting Docker image if set to `true`. Defaults to `true`. Excluding `mendix-logfilter` will reduce the image size and remove a component that's not commonly used; the `LOG_RATELIMIT` environment variable option will be disabled.\n- **UNINSTALL_BUILD_DEPENDENCIES** will uninstall packages which are not needed to launch an app, and are only used during the build phase. Defaults to `true`. This option will remove several libraries which are known to have unpatched CVE vulnerabilities.\n- **CF_BUILDPACK_URL** specifies the URL where the CF buildpack should be downloaded from (for example, a local mirror). Defaults to `https://github.com/mendix/cf-mendix-buildpack/releases/download/${CF_BUILDPACK}/cf-mendix-buildpack.zip`. Specifying **CF_BUILDPACK_URL** will override the version from **CF_BUILDPACK**.\n- **BLOBSTORE** can be used to specify an alternative buildpack resource server (instead of the default Mendix CDN). For more information, see the [CF Buildpack offline settings](https://github.com/mendix/cf-mendix-buildpack#offline-buildpack-settings).\n- **BUILDPACK_XTRACE** can be used to enable CF Buildpack [debug logging](https://github.com/mendix/cf-mendix-buildpack#logging-and-debugging). Set this variable to `true` to enable debug logging.\n\n### Startup\n\nTo start the container, it is required to provide the container with the password\nto create an administrative account of your mendix application **ADMIN_PASSWORD**\nand the **DATABASE_ENDPOINT** as you can see in the example below:\n\n```\ndocker run -it \\\n  -e ADMIN_PASSWORD=Password1! \\\n  -e DATABASE_ENDPOINT=postgres://username:password@host:port/mendix \\\n  mendix/mendix-buildpack:v1.2  \n```\n\nor for Microsoft SQL server\n\n```\ndocker run -it \\\n  -e ADMIN_PASSWORD=Password1! \\\n  -e DATABASE_ENDPOINT=sqlserver://username:password@host:port/mendix \\\n  mendix/mendix-buildpack:v1.2  \n```\n\nAlternative ways to configure database connection:\n\n* `DATABASE_URL` environment variable\n\n```\ndocker run -it \\\n  -e ADMIN_PASSWORD=Password1! \\\n  -e DATABASE_URL=sqlserver://username:password@host:port/mendix \\\n  mendix/mendix-buildpack:v1.2  \n```\n\n* [Custom runtime settings](https://github.com/mendix/cf-mendix-buildpack/#configuring-custom-runtime-settings)\n\n```\n// full config\ndocker run -it \\\n  -e ADMIN_PASSWORD=Password1! \\\n  -e MXRUNTIME_DatabaseType=MYSQL \\\n  -e MXRUNTIME_DatabaseUserName=mendix \\\n  -e MXRUNTIME_DatabasePassword=mendix \\\n  -e MXRUNTIME_DatabaseName=mendix \\\n  -e MXRUNTIME_DatabaseHost=host:port \\\n  mendix/mendix-buildpack:v1.2  \n\n// config with jdbc url\ndocker run -it \\\n  -e ADMIN_PASSWORD=Password1! \\\n  -e MXRUNTIME_DatabaseType=MYSQL \\\n  -e MXRUNTIME_DatabaseUserName=mendix \\\n  -e MXRUNTIME_DatabasePassword=mendix \\\n  -e MXRUNTIME_DatabaseJdbcUrl=mysql://db:3306/mendix \\\n  -e MXRUNTIME_DatabaseName=mendix \\\n  mendix/mendix-buildpack:v1.2  \n```\n\n## Features\n\nThis project uses the same base technology that Mendix uses to run the application in Cloud Foundry (the [mendix cloudfoundry buildpack](https://github.com/mendix/cf-mendix-buildpack)).\n\n* Compilation of a Mendix application from project sources\n* Automatic generation of the configuration (_m2ee.yaml_)\n* Startup of the application when the container is spin up  \n* Configured [nginx](https://nginx.org/) as the reverse proxy\n\n### Current limitations\n\n* **PostgreSQL** and **SQLSERVER** database supported\n* This setup will use a trial license for your application by default\n\n### Enabling License\n\nIf you wish to start your application with a non-trial license, please provide the additional environment variables:\n\n* LICENSE_ID\n* LICENSE_KEY\n\nexample:\n\n```\ndocker run -it \\\n  -p 8080:80 \\\n  -e ADMIN_PASSWORD=Password1! \\\n  -e DATABASE_ENDPOINT=postgres://mendix:mendix@172.17.0.2:5432/mendix \\\n  -e LICENSE_ID=\u003cUUID\u003e \\\n  -e LICENSE_KEY=\u003cLICENSE_KEY\u003e \\\n  mendix/mendix-buildpack:v1.2  \n```\n\n### Passing environment variables to your Mendix runtime\n\nThe default values for constants will be used as defined in your project. However, you can override them with environment variables. You need to replace the dot with an underscore and prefix it with MX_. So a constant like Module. Constant with value ABC123 could be set like this:\n\nexample:\n\n```\ndocker run -it \\\n  -p 8080:80 \\\n  -e ADMIN_PASSWORD=Password1! \\\n  -e DATABASE_ENDPOINT=postgres://mendix:mendix@172.17.0.2:5432/mendix \\\n  -e MX_Module_Constant=ABC123 \\\n  -e LICENSE_ID=\u003cUUID\u003e \\\n  -e LICENSE_KEY=\u003cLICENSE_KEY\u003e \\\n  mendix/mendix-buildpack:v1.2  \n```\n\nTwo ways to pass multi-line environment variable:\n1. Command line - when **docker run** executed, it's possible to pass multi-line value with double quotes \n```\ndocker run -it \\\n  -e CERTIFICATE_AUTHORITIES=\"-----BEGIN CERTIFICATE-----\n                MIIGejCCBGKgAwIBAgIJANuKwREDEb4sMA0GCSqGSIb3DQEBCwUAMIGEMQswCQYD\n                VQQGEwJOTDEVMBMGA1UECBMMWnVpZC1Ib2xsYW5kMRIwEAYDVQQHEwlSb3R0ZXJk\n                YW0xDzANBgNVBAoTBk1lbmRpeDEXMBUGA1UEAxMOTWVuZGl4IENBIC0gRzIxIDAe...\"\n```\n2. Docker-compose - special prefix can be used\n```\nenvironment:\n    CERTIFICATE_AUTHORITIES: |-\n                -----BEGIN CERTIFICATE-----\n                MIIGejCCBGKgAwIBAgIJANuKwREDEb4sM....\n```\n\n### Configuring Custom Runtime Settings\n\nTo configure any of the advanced [Custom Runtime Settings](https://world.mendix.com/display/refguide6/Custom+Settings) you can use setting name prefixed with `MXRUNTIME_` as an environment variable.\n\nFor example, to configure the ConnectionPoolingMinIdle setting to value 10, you can set the following environment variable:\n\nExample:\n\n```\ndocker run -it \\\n  -p 8080:80 \\\n  -e ADMIN_PASSWORD=Password1! \\\n  -e DATABASE_ENDPOINT=postgres://mendix:mendix@172.17.0.2:5432/mendix \\\n  -e MXRUNTIME_ConnectionPoolingMinIdle 10 \\\n  mendix/mendix-buildpack:v1.2  \n```\n\nIf the setting contains a dot . you can use an underscore _ in the environment variable. So to set com.mendix.storage.s3.EndPoint to foo you can use:\n\n```\nMXRUNTIME_com_mendix_storage_s3_EndPoint foo\n```\n\n### Configuring Enabled Scheduled Events\n\nThe scheduled events can be configured using environment variable `SCHEDULED_EVENTS`.\n\nPossible values are `ALL`, `NONE` or a comma separated list of the scheduled events that you would like to enable. For example: `ModuleA.ScheduledEvent,ModuleB.OtherScheduledEvent`\n\nAn example in a docker run command:\n\n```\ndocker run -it \\\n  -p 8080:80 \\\n  -e ADMIN_PASSWORD=Password1! \\\n  -e DATABASE_ENDPOINT=postgres://mendix:mendix@172.17.0.2:5432/mendix \\\n  -e SCHEDULED_EVENTS=ALL \\\n  mendix/mendix-buildpack:v1.2  \n```\n\n### Configuring Application log levels\n\nConfiguring log levels happens by adding one or more environment variables starting with the name `LOGGING_CONFIG` (the part of the name after that is not relevant and only used to distinguish between multiple entries if necessary). Its value should be valid JSON, in the format:\n\n    {\n      \"LOGNODE\": \"LEVEL\"\n    }\n\nYou can see the available Log Nodes in your application in the Mendix Modeler. The level should be one of:\n\n * `CRITICAL`\n * `ERROR`\n * `WARNING`\n * `INFO`\n * `DEBUG`\n * `TRACE`\n\n\nExample:\n\n```\ndocker run -it \\\n  -p 8080:80 \\\n  -e ADMIN_PASSWORD=Password1! \\\n  -e DATABASE_ENDPOINT=postgres://mendix:mendix@172.17.0.2:5432/mendix \\\n  -e LOGGING_CONFIG='{\"Core\": \"DEBUG\"}' \\\n  mendix/mendix-buildpack:v1.2  \n```\n### Monitoring the runtime\n\nThe admin interface can be used to measure the health of the Runtime as per [documentation](https://docs.mendix.com/refguide/monitoring-mendix-runtime). The password of the admin port can be set using the environment variable M2EE_PASSWORD. The standard username is MxAdmin. The interface is exposed to the outside world on the url /_mxadmin/ and can be accessed by using basic HTTP authentication. Refer to the [documentation](https://docs.mendix.com/refguide/monitoring-mendix-runtime) to learn how to use this interface.\n\nTo clarify: \n- the HTTP basic authentication credentials are: MxAdmin / [M2EE_PASSWORD] .\n- the X-M2EE-Authentication header contains a base64-encoded version of [M2EE_PASSWORD] .\n\n### Health check\n\nThe docker compose files, in the ```/test``` folder, contain an example how to perform a healtcheck on a Mendix app:\n\n```\nhealthcheck:\n            test: [\"CMD\", \"curl\", \"-f\", \"http://localhost\"]\n            interval: 15s\n            retries: 2\n            start_period: 10s\n            timeout: 3s\n```\n\nThe health check monitors the status of the Mendix container, but it does not autoheal or restarts the container in case of unhealthy status, relying on the Docker runtime to perform the aforementioned task. For instance, Kubernetes is in charge to restart the unhealthy containers, but reporting their status it is a responsibility of the containers themselves. For a Kubernetes example, please follow this [link](https://github.com/mendix/kubernetes-howto/blob/master/mendix-app.yaml).\n\nFor further information, the official documentation [here](https://docs.docker.com/engine/reference/builder/#healthcheck).\n\n### Certificate Management\n\n\nCertificate Authorities (CAs) can be managed using the CERTIFICATE_AUTHORITIES environment variable, see the upstream [Cloud Foundry Build Pack documentation](https://github.com/mendix/cf-mendix-buildpack#certificate-management). \n\nIn case your environment does not support multi-line environment variables, a Base64-encoded string containing the desired CA Certificates can be used alternatively. \n\nThis string should be set into the CERTIFICATE_AUTHORITIES_BASE64 environment variable.\n\n### Advanced feature: full-build\n\nTo save build time, the build pack will normally use a pre-built rootfs from Docker Hub. This rootfs is prepared nightly by Mendix using [this](https://github.com/mendix/docker-mendix-buildpack/blob/master/Dockerfile.rootfs.bionic) Dockerfile. If you want to build the root-fs yourself you can use the following script:\n\n```\ndocker build --build-arg BUILD_PATH=\u003cmendix-project-location\u003e \\\n\t-t \u003croot-fs-image-tag\u003e -f Dockerfile.rootfs.bionic .\n```\n\nAfter that you can build the target image with the next command:\n\n```\ndocker build \n  --build-arg BUILD_PATH=\u003cmendix-project-location\u003e \\\n  --build-arg ROOTFS_IMAGE=\u003croot-fs-image-tag\u003e \\\n  --build-arg BUILDER_ROOTFS_IMAGE=\u003cbuilder-root-fs-image-tag\u003e \\\n```\n\t-t mendix/mendix-buildpack:v1.2 .\n\n\n### Industrial Edge Configuration File support\n\nWhen running Mendix on Industrial Edge it is possible to add a configuration file for each Edge device with specific environment variable next to the default variable which are configured within the docker compose file. \n\nThe container will query for a specific location, based on the environment variable: \"IEM_CONFIG_PATH\", for files with the extention \".env\".  Such a file can contain 1 or more environment variable, which will be added to the environment variable of the container. This can be used to set Edge device specific Constants, Scheduled events or custom runtime settings. Check [here](https://github.com/mendix/cf-mendix-buildpack#configuring-constants) for the syntax to use. \n\nBelow an example compose file including the \"IEM_CONFIG_PATH\"\"\n\n```\nmyapp:\n  environment:\n    ADMIN_PASSWORD: *******\n    DATABASE_ENDPOINT: 'jdbc:hsqldb:file:~/data/database/db:mem:mendix'\n    MXRUNTIME_DatabaseType: HSQLDB\n    MXRUNTIME_DatabaseJdbcUrl: 'jdbc:hsqldb:file:~/data/database/db:mem:mendix'\n    IEM_CONFIG_PATH: /cfg-data\n  image: 'sample_app:1.1'\n  volumes:\n    - './publish/:/publish/'\n    - './cfg-data/:/cfg-data/'\n  mem_limit: 1gb\n  restart: unless-stopped\n  ports:\n    - '60000:8080'\n```\n\n\n## Contributions\n\nContributions are welcomed:\n\n1. open an issue about your topic\n2. fork, make a branch named starting with the issue number you are resolving (see [here](https://github.com/mendix/docker-mendix-buildpack/pulls?q=is%3Apr+is%3Aclosed)) and make a pull request to the master branch\n3. please add some tests for feature changes\n\n### Build Details\n\nThis was built with the following:\n\n* Docker version 18.06.3\n\n### Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/mendix/IBM-Watson-Connector-Kit/tags).\n\n## License\n\nThis project is licensed under the Apache License v2 (for details, see the [LICENSE](LICENSE-2.0.txt) file).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmendix%2Fdocker-mendix-buildpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmendix%2Fdocker-mendix-buildpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmendix%2Fdocker-mendix-buildpack/lists"}