GitXplorerGitXplorer
o

docker-drawio-desktop-linux

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
ca922ceb6c8f3821effe1f9c96fff5ef3124b2cd

Fix remaining Teams mentions

oolberger committed 4 years ago
Unverified
556136f5a8e57ce039839d2587841c15f96a4c36

Iniyial version for draw.io desktop

oolberger committed 4 years ago
Unverified
6a123835dab4a039e9bc5766d1dd76d387076bfb

New wrapper script name

oolberger committed 4 years ago
Unverified
d5a37eb46c4d15ed3c575648da18d6f0b4a0ef1c

Fix mounted volumes list

oolberger committed 4 years ago
Unverified
de5c8207601b0753d113331f836650ff8a482cfb

Cleanup to the minimal dependencies

oolberger committed 4 years ago
Unverified
e992eab27c1c46f922a24121d4adb9f2ce6b68e7

Rename docker image/repo

oolberger committed 4 years ago

README

The README file for this repository.

This project is fully inspired of Marc Douchement's docker-zoom-us, which in turn was inspired by sameersbn Skype's containerization.

olberger/docker-drawio-linux

Introduction

Dockerfile to create a Docker container image with Draw.io desktop for Linux.

The image uses X11 unix domain socket on the host to enable display of the Draw.io desktop app. These components are available out of the box on pretty much any modern linux distribution.

Contributing

If you find this image useful here's how you can help:

  • Send a pull request with your awesome features and bug fixes
  • Help users resolve their issues.

Getting started

Installation

Automated builds of the image are available on Dockerhub and is the recommended method of installation.

docker pull olberger/docker-drawio-desktop-linux:latest

Alternatively you can build the image yourself.

docker build -t olberger/docker-drawio-desktop-linux github.com/olberger/docker-drawio-desktop-linux

With the image locally available, install the wrapper scripts by running the following as root:

docker run -it --rm \
  --volume /usr/local/bin:/target \
  olberger/docker-drawio-desktop-linux:latest install

This will install a wrapper script to launch drawio.

Starting Drawio

Launch the drawio-wrapper script to enter a shell inside the Docker container

drawio-wrapper bash

Then the prompt should be displayed like:

Adding user `drawio' to group `sudo' ...
Adding user drawio to group sudo
Done.
bash
launch draw.io by invoking 'drawio' at the bash prompt:
drawio@0b2fefbf45d2:~$

then type drawio.

Note

If Draw.io is installed on the the host then the host binary is launched instead of starting a Docker container. To force the launch of Draw.io in a container use the drawio-wrapper script. For example, drawio-wrapper teams will launch Draw.io inside a Docker container regardless of whether it is installed on the host or not.

How it works

The wrapper scripts volume mount the X11 socket in the launcher container. The X11 socket allows for the user interface display on the host.

When the image is launched the following directories are mounted as volumes

  • ${HOME}/.config/draw.io
  • the ${PWD}/diagrams-from-host/ subdir, i.e. a subdir of the current directory

This makes sure that the configuration of the tool are stored on the host and files saved are preserved in the current suddir, if places inside the special 'diagrams-from-host/' directory.

Don't want to expose host's folders to Draw.io application?

Add DRAWIO_HOME environment variable to namespace all draw.io folders:

export DRAWIO_HOME=${HOME}/draw.io

Maintenance

Upgrading

To upgrade to newer releases:

  1. Download the updated Docker image:
docker pull olberger/docker-drawio-desktop-linux:latest
  1. Run install to make sure the host scripts are updated.
docker run -it --rm \
  --volume /usr/local/bin:/target \
  olberger/docker-drawio-desktop-linux:latest install

Uninstallation

docker run -it --rm \
  --volume /usr/local/bin:/target \
  olberger/docker-drawio-desktop-linux:latest uninstall