Docker packaging for draw.io. Produces the jgraph/drawio Docker image.
The separate export server image (jgraph/export-server, formerly image-export/) is end-of-life and has been removed. Do not reintroduce EXPORT_URL / DRAWIO_SELF_CONTAINED handling or references to it. The one exception is the fixed window.EXPORT_URL = null; line the entrypoint writes into PreConfig.js: it tells the editor that no export service exists, so PDF export falls back to the print dialog instead of posting to convert.diagrams.net (which rejects other hosts). Keep that line; it is not export-server handling.
main/— The draw.io Docker image (Tomcat + draw.io WAR built from source)Dockerfile— Multi-stage build: builds draw.io WAR with Ant, deploys to Tomcat 9docker-entrypoint.sh— Runtime configuration via environment variables (PreConfig.js / PostConfig.js generation, SSL setup, Tomcat context path)
docker-compose.yml— Runs the image with everyDRAWIO_*variable passed through from the environment / a.envfile (Google Drive, OneDrive and GitLab integrations)nextcloud/— docker-compose for Nextcloud integration with nginx reverse proxydeploy/kubernetes/— Kubernetes manifests.github/workflows/docker-image-main.yml— Builds, tests and pushes the image on version tags and weekly
- The main branch is
dev. - Commit messages reference upstream issues as
[jgraph/drawio#NNN]and docker-drawio issues as[jgraph/docker-drawio#NNN]. - Environment variables are the primary configuration mechanism. They are processed in
main/docker-entrypoint.shwhich generates JS config files injected into the draw.io webapp at container startup. - The upstream draw.io source is cloned at build time (not vendored). The WAR is built from
https://github.com/jgraph/drawio.
# Build the image
docker build -t jgraph/drawio main/
# Run locally
docker run -it --rm -p 8080:8080 jgraph/drawio
# Run with docker compose (configuration from a .env file)
docker compose upNew environment variables should:
- Be documented in
README.mdunder "Environment variables" - Be processed in
main/docker-entrypoint.sh - Be passed through in
docker-compose.yml - Follow the
DRAWIO_*naming convention for draw.io-specific settings - Use shell defaults:
${VAR:-default_value}