docker-camunda-bpm-platform

docker-camunda-bpm-platform

Camunda工作流引擎的Docker容器化部署方案

该项目提供Camunda Platform的Docker镜像,支持Tomcat、Wildfly和Run等多种应用服务器。通过环境变量可配置数据库连接、Java参数等。镜像具备等待数据库就绪、调试、Prometheus监控等功能,并支持构建企业版。适用于快速部署测试和生产环境,简化了Camunda工作流引擎的容器化部署流程。

Camunda PlatformDocker镜像容器化流程引擎微服务Github开源项目

Camunda Platform Docker images

Use our GitHub issue tracker for bug reports or feature requests. For help requests, open a help request topic on the Camunda forum or a help request support ticket if you are an enterprise customer.

This Camunda project provides docker images of the latest Camunda Platform releases. The images can be used to demonstrate and test the Camunda Platform or can be extended with own process applications. It is planned to provide images on the official [docker registry][] for every upcoming release, which includes alpha releases.

The Camunda Platform Docker images are wrappers for the pre-packaged Camunda distributions. The pre-packaged distributions are intended for users who want a getting started experience. In case you want to use the Camunda Docker images in production, consider reading our security instructions.

Distributions

You can find more detailed documentation on the pre-packaged (community) distributions that Camunda provides at the following links:

Get started

To start a Docker container of the latest Camunda Platform 7 release:

docker pull camunda/camunda-bpm-platform:latest
docker run -d --name camunda -p 8080:8080 camunda/camunda-bpm-platform:latest

Tasklist, Cockpit, Admin web apps

The three Camunda web apps are accessible through the landing page: http://localhost:8080/camunda-welcome/index.html

The default credentials for admin access to the web apps is:

  • Username: demo
  • Password: demo

REST API

The Camunda Rest-API is accessible through: http://localhost:8080/engine-rest

See the REST API documentation for more details on how to use it.

Note: The REST API does not require authentication by default. Follow the instructions from the documentation to enable authentication for the REST API.

Supported tags/releases

The following tag schema is used. The user has the choice between different application server distributions of Camunda Platform.

  • latest, ${DISTRO}-latest: Always the latest minor release of Camunda Platform.
  • SNAPSHOT, ${VERSION}-SNAPSHOT, ${DISTRO}-SNAPSHOT, ${DISTRO}-${VERSION}-SNAPSHOT: The latest SNAPSHOT version of Camunda Platform, which is not released yet.
  • ${VERSION}, ${DISTRO}-${VERSION}: A specific version of Camunda Platform.

${DISTRO} can be one of the following:

  • tomcat
  • wildfly
  • run

If no ${DISTRO} is specified, the tomcat distribution is used. For all available tags see the [docker hub tags][].

Camunda Platform 7 configuration

You can find the complete Camunda documentation at https://docs.camunda.org/.

If you prefer to start your Camunda Docker image right away, you will find the following links useful:

Camunda Docker image configuration

Configuration of the run distribution

Because run is a Spring Boot-based distribution, it can be configured through the respective environment variables. For example:

  • SPRING_DATASOURCE_DRIVER_CLASS_NAME the database driver class name, supported are h2 (default), mysql, and postgresql:
    • h2: DB_DRIVER=org.h2.Driver
    • mysql: DB_DRIVER=com.mysql.cj.jdbc.Driver
    • postgresql: DB_DRIVER=org.postgresql.Driver
  • SPRING_DATASOURCE_URL the database jdbc url
  • SPRING_DATASOURCE_USERNAME the database username
  • SPRING_DATASOURCE_PASSWORD the database password

When not set or otherwise specified, the integrated H2 database is used.

Any other SPRING_* variables can be used to further configure the app. Alternatively, a default.yml file can be mounted to /camunda/configuration/default.yml. More information on configuring Spring Boot applications can be found in the Spring Boot documentation.

The following environment variables are supported for convenience and compatibility and are internally mapped to SPRING_DATASOURCE_* variables when provided:

  • DB_DRIVER
  • DB_USERNAME
  • DB_PASSWORD
  • DB_URL
  • DB_PASSWORD_FILE

The JMX_PROMETHEUS configuration is not supported, and while DEBUG can be used to enable debug output, it doesn't start a debug socket.

run supports different startup options to choose whether or not to enable the WebApps, the REST API or Swagger UI. By default, all three are enabled.

Passing startup parameters to enable them selectively can be done by passing any combination of --webapps, --rest or --swaggerui like in the following example:

Enable only web apps:

docker run camunda/camunda-bpm-platform:run ./camunda.sh --webapps

Enable only REST API and Swagger UI:

docker run camunda/camunda-bpm-platform:run ./camunda.sh --rest --swaggerui

Additionally, a --production parameter is supported to switch the configuration to /camunda/configuration/production.yml. This parameter also disables Swagger UI by default.

Java versions

Our docker images are using a LTS OpenJDK version supported by Camunda Platform. This currently means:

  • Camunda 7.20 or later will be based on OpenJDK 17.
    • Camunda 7.20 image for Camunda Run is supported only for JDK 17.
  • Camunda 7.12 - 7.19 is based on OpenJDK 11.
    • Camunda 7.19 image for WildFly is supported only for JDK 11 and JDK 17.
  • All previous versions are based on OpenJDK 8.

While all the OpenJDK versions supported by Camunda will work with the exceptions specified above, we will not provide ready to use images for them.

Java options

To override the default Java options the environment variable JAVA_OPTS can be set.

Use docker memory limits

Instead of specifying the Java memory settings it is also possible to instruct the JVM to respect the docker memory settings. As the image uses Java 17 it does not have to be enabled explicitly using the JAVA_OPTS environment variable. If you want to set the memory limits manually you can restore the pre-Java-11-behavior by setting the following environment variable.

JAVA_OPTS="-XX:-UseContainerSupport"

Database environment variables

The used database can be configured by providing the following environment variables:

  • DB_CONN_MAXACTIVE the maximum number of active connections (default: 20)
  • DB_CONN_MAXIDLE the maximum number of idle connections (default: 20)
    • ignored when app server = wildfly or run
  • DB_CONN_MINIDLE the minimum number of idle connections (default: 5)
  • DB_DRIVER the database driver class name, supported are h2, mysql, and postgresql:
    • h2: DB_DRIVER=org.h2.Driver
    • mysql: DB_DRIVER=com.mysql.cj.jdbc.Driver
    • postgresql: DB_DRIVER=org.postgresql.Driver
  • DB_URL the database jdbc url
  • DB_USERNAME the database username
  • DB_PASSWORD the database password
  • DB_VALIDATE_ON_BORROW validate database connections before they are used (default: false)
  • DB_VALIDATION_QUERY the query to execute to validate database connections (default: "SELECT 1")
  • DB_PASSWORD_FILE this supports Docker Secrets. Put here the path of the secret, e.g. /run/secrets/camunda_db_password. Make sure that DB_PASSWORD is not set when using this variable!
  • SKIP_DB_CONFIG skips the automated database configuration to use manual configuration
  • WAIT_FOR wait for a host:port to be available over TCP before starting. Check Waiting for database for details.
  • WAIT_FOR_TIMEOUT how long to wait for the service to be avaiable - defaults to 30 seconds. Check Waiting for database for details.

For example, to use a postgresql docker image as database you can start the platform as follows:

# start postgresql image with database and user configured
docker run -d --name postgresql ...

docker run -d --name camunda -p 8080:8080 --link postgresql:db \
           -e DB_DRIVER=org.postgresql.Driver \
           -e DB_URL=jdbc:postgresql://db:5432/process-engine \
           -e DB_USERNAME=camunda \
           -e DB_PASSWORD=camunda \
           -e WAIT_FOR=db:5432 \
           camunda/camunda-bpm-platform:latest

Another option is to save the database config to an environment file, i.e. db-env.txt:

DB_DRIVER=org.postgresql.Driver
DB_URL=jdbc:postgresql://db:5432/process-engine
DB_USERNAME=camunda
DB_PASSWORD=camunda
WAIT_FOR=db:5432

Use this file to start the container:

docker run -d --name camunda -p 8080:8080 --link postgresql:db \
           --env-file db-env.txt camunda/camunda-bpm-platform:latest

The docker image already contains drivers for h2, mysql, and postgresql. If you want to use other databases, you have to add the driver to the container and configure the database settings manually by linking the configuration file into the container.

To skip the configuration of the database by the docker container and use your own configuration set the environment variable SKIP_DB_CONFIG to a non-empty value:

docker run -d --name camunda -p 8080:8080 -e SKIP_DB_CONFIG=true \
           camunda/camunda-bpm-platform:latest

Waiting for database

Starting the Camunda Platform Docker image requires the database to be already available. This is quite a challenge when the database and Camunda Platform are both docker containers spawned simultaneously, for example, by docker compose or inside a Kubernetes Pod. To help with that, the Camunda Platform Docker image includes wait-for-it.sh to allow the container to wait until a 'host:port' is ready. The mechanism can be configured by two environment variables:

  • WAIT_FOR_TIMEOUT: how long to wait for the service to be available in seconds
  • WAIT_FOR: the service host:port to wait for. You can provide multiple host-port pairs separated by a comma or an empty space (Example: "host1:port1 host2:port2"). The WAIT_FOR_TIMEOUT applies to each specified host, i.e. Camunda will wait for host1:port1 to become available and, if unavailable for the complete WAIT_FOR_TIMEOUT duration, will wait for host2:port2 for another WAIT_FOR_TIMEOUT period.

Example with a PostgreSQL container:

docker run -d --name postgresql ...

docker run -d --name camunda -p 8080:8080 --link postgresql:db \
           -e DB_DRIVER=org.postgresql.Driver \
           -e DB_URL=jdbc:postgresql://db:5432/process-engine \
           -e DB_USERNAME=camunda \
           -e DB_PASSWORD=camunda \
           -e WAIT_FOR=db:5432 \
           -e WAIT_FOR_TIMEOUT=60 \
           camunda/camunda-bpm-platform:latest

Volumes

Camunda Platform is installed inside the /camunda directory. Which means the Apache Tomcat configuration files are inside the /camunda/conf/ directory and the deployments on Apache Tomcat are in /camunda/webapps/. The directory structure depends on the application server.

Debug

To enable JPDA inside the container, you can set the environment variable DEBUG=true on startup of the container. This will allow you to connect to the container on port 8000 to debug your application. This is only supported for wildfly and tomcat distributions.

Prometheus JMX Exporter

To enable Prometheus JMX Exporter inside the container, you can set the environment variable JMX_PROMETHEUS=true on startup of the container. This will allow you to get metrics in Prometheus format at <host>:9404/metrics. For configuring exporter you need attach your configuration as a container volume at /camunda/javaagent/prometheus-jmx.yml. This is only supported for wildfly and tomcat distributions.

Change timezone

To change the timezone of the docker container, you can set the environment variable TZ.

docker run -d --name camunda -p 8080:8080 \
           -e TZ=Europe/Berlin \
          camunda/camunda-bpm-platform:latest

Build

You can build a Docker image for a given Camunda Platform version and distribution yourself. Make sure to adjust the settings.xml and remove the camunda-nexus mirror (no matter if you are building a community or enterprise edition). If you want to build the enterprise edition (EE), check out the dedicated README section.

Build a released version

To build a community image specify the DISTRO and VERSION build argument. Possible values for DISTRO are:

  • tomcat
  • wildfly
  • run (if the Camunda Platform version already supports it)

The VERSION argument is the Camunda Platform version you want to build, i.e. 7.17.0.

docker build -t camunda-bpm-platform \
  --build-arg DISTRO=${DISTRO} \
  --build-arg VERSION=${VERSION} \
  .

Build a SNAPSHOT version

Additionally, you can build SNAPSHOT versions for the upcoming releases by setting the SNAPSHOT build argument to true.

docker build -t camunda-bpm-platform \
  --build-arg DISTRO=${DISTRO} \
  --build-arg VERSION=${VERSION} \
  --build-arg SNAPSHOT=true \
  .

Build an enterprise version

If you are a Camunda enterprise customer, you can build an enterprise version of the Docker image. Set the VERSION build argument to the Camunda version without the ee suffix, i.e. 7.16.1, set the EE build argument to true and the USER and PASSWORD build argument to your enterprise credentials.

It is recommended that you git checkout the branch for the Camunda version you would like to build. For example, if you want to build a Docker image for Camunda version 7.16.3, first execute git checkout 7.16 on this repository.

Note: As the image uses a multi-stage Dockerfile the credentials are not part of the Docker image history of the final image. Be aware that you should not distribute this image outside your company.

docker build -t camunda-bpm-platform \
  --build-arg EE=true \
  --build-arg DISTRO=${DISTRO} \
  --build-arg VERSION=${VERSION} \
  --build-arg USER=${USER} \
  --build-arg PASSWORD=${PASSWORD} \
  .

Build when behind a proxy

You can pass the following arguments to set proxy settings to Maven:

  • MAVEN_PROXY_HOST
  • MAVEN_PROXY_PORT
  • MAVEN_PROXY_USER
  • MAVEN_PROXY_PASSWORD

Example for a released version of a community edition:

docker build -t camunda-bpm-platform \
  --build-arg DISTRO=${DISTRO} \
  --build-arg VERSION=${VERSION} \
  --build-arg MAVEN_PROXY_HOST=${PROXY_HOST} \
  --build-arg MAVEN_PROXY_PORT=${PROXY_PORT} \
  --build-arg MAVEN_PROXY_USER=${PROXY_USER} \
  --build-arg MAVEN_PROXY_PASSWORD=${PROXY_PASSWORD} \
  .

Override MySQL and PostgreSQL driver versions.

By default, the driver versions are fetched from https://github.com/camunda/camunda-bpm-platform/blob/master/database/pom.xml. That can be overriden by passing MYSQL_VERSION and POSTGRESQL_VERSION build args

docker build -t camunda-bpm-platform \
  --build-arg DISTRO=${DISTRO} \
  --build-arg VERSION=${VERSION} \
  --build-arg POSTGRESQL_VERSION=${POSTGRESQL_VERSION} \
  --build-arg MYSQL_VERSION=${MYSQL_VERSION} \
  .

Use cases

Change configuration files

You can use docker volumes to link your own configuration files inside the container. For example, if you want to change the bpm-platform.xml on Apache Tomcat:

docker run -d --name camunda -p 8080:8080 \
           -v $PWD/bpm-platform.xml:/camunda/conf/bpm-platform.xml \
          

编辑推荐精选

商汤小浣熊

商汤小浣熊

最强AI数据分析助手

小浣熊家族Raccoon,您的AI智能助手,致力于通过先进的人工智能技术,为用户提供高效、便捷的智能服务。无论是日常咨询还是专业问题解答,小浣熊都能以快速、准确的响应满足您的需求,让您的生活更加智能便捷。

imini AI

imini AI

像人一样思考的AI智能体

imini 是一款超级AI智能体,能根据人类指令,自主思考、自主完成、并且交付结果的AI智能体。

Keevx

Keevx

AI数字人视频创作平台

Keevx 一款开箱即用的AI数字人视频创作平台,广泛适用于电商广告、企业培训与社媒宣传,让全球企业与个人创作者无需拍摄剪辑,就能快速生成多语言、高质量的专业视频。

即梦AI

即梦AI

一站式AI创作平台

提供 AI 驱动的图片、视频生成及数字人等功能,助力创意创作

扣子-AI办公

扣子-AI办公

AI办公助手,复杂任务高效处理

AI办公助手,复杂任务高效处理。办公效率低?扣子空间AI助手支持播客生成、PPT制作、网页开发及报告写作,覆盖科研、商业、舆情等领域的专家Agent 7x24小时响应,生活工作无缝切换,提升50%效率!

TRAE编程

TRAE编程

AI辅助编程,代码自动修复

Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。

AI工具TraeAI IDE协作生产力转型热门
蛙蛙写作

蛙蛙写作

AI小说写作助手,一站式润色、改写、扩写

蛙蛙写作—国内先进的AI写作平台,涵盖小说、学术、社交媒体等多场景。提供续写、改写、润色等功能,助力创作者高效优化写作流程。界面简洁,功能全面,适合各类写作者提升内容品质和工作效率。

AI辅助写作AI工具蛙蛙写作AI写作工具学术助手办公助手营销助手AI助手
问小白

问小白

全能AI智能助手,随时解答生活与工作的多样问题

问小白,由元石科技研发的AI智能助手,快速准确地解答各种生活和工作问题,包括但不限于搜索、规划和社交互动,帮助用户在日常生活中提高效率,轻松管理个人事务。

热门AI助手AI对话AI工具聊天机器人
Transly

Transly

实时语音翻译/同声传译工具

Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。

讯飞智文

讯飞智文

一键生成PPT和Word,让学习生活更轻松

讯飞智文是一个利用 AI 技术的项目,能够帮助用户生成 PPT 以及各类文档。无论是商业领域的市场分析报告、年度目标制定,还是学生群体的职业生涯规划、实习避坑指南,亦或是活动策划、旅游攻略等内容,它都能提供支持,帮助用户精准表达,轻松呈现各种信息。

AI办公办公工具AI工具讯飞智文AI在线生成PPTAI撰写助手多语种文档生成AI自动配图热门
下拉加载更多