Skip to content

rlespinasse/docker-drawio-desktop-headless

v1.x
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Draw.io Desktop Headless docker image

Dockerized headless version of Draw.io Desktop '21.7.5'

What it does

Draw.io Desktop exposes a command-line client to allow us to create, check or export diagrams.

Since Draw.io Desktop is a GUI application, we need a GUI environment to run it. And this prevents us to use it for automation in non-GUI environments such as CI tools.

This docker image enables us to run the command-line client in a headless mode by using a configurable X server.

Other minor additions are available

Note
Want a new font package, modify the Dockerfile to install the missing package.

Running

docker run -it -w /data -v $(pwd):/data rlespinasse/drawio-desktop-headless

Configuration

Environment Variable Description Default Value

DRAWIO_DESKTOP_COMMAND_TIMEOUT

To prevent Draw.io Desktop process to hang indefinitely.

The value is a floating point number with an optional suffix: 's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days. A duration of 0 disables the associated timeout.

10s

XVFB_DISPLAY

Screen Display setup for XVFB

:42

XVFB_OPTIONS

Options for Xvfb

ELECTRON_DISABLE_SECURITY_WARNINGS

Avoid printing electron warning

true

DRAWIO_DISABLE_UPDATE

Disable auto-update of Draw.io Desktop

true

Use as docker base image

This docker image can be used as the base image to build a higher-level tool upon it.

In addition to running configuration, you have access to

  • DRAWIO_DESKTOP_EXECUTABLE_PATH to have access to the executable path of Draw.io Desktop.

  • DRAWIO_DESKTOP_RUNNER_COMMAND_LINE to run your script instead of the default one.

Used by

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.