Install draw.io Inside Docker Container on Linux

Install draw.io Inside Docker Container on Linux

The draw.io is an open-source diagramming tool used for creating various types of diagrams, such as flowcharts, process diagrams, network diagrams, and more. It provides a drag-and-drop interface with a wide range of shapes and templates, allowing users to create diagrams quickly and easily.

This tutorial explains how to install draw.io inside a Docker container on Linux. Commands have been tested on Ubuntu.

Prepare environment

Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.

Install draw.io

  • Host network

Run the following command to create a container for draw.io that uses host network:

docker run -d --name=drawio --restart=always --network=host \
    jgraph/drawio
  • User-defined bridge network

User-defined bridge network can be used for listening on different port. By default, draw.io service is listening on port 8080. It can be changed with -p option.

docker network create app-net
docker run -d --name=drawio --restart=always --network=app-net \
    -p 8081:8080 \
    jgraph/drawio

Testing draw.io

To access the web application, go to http://<IP_ADDRESS>:8080, replacing <IP_ADDRESS> with the system's IP address.

draw.io Inside Docker Container on Linux

Uninstall draw.io

To completely remove draw.io, remove its container:

docker rm --force drawio

Remove draw.io image:

docker rmi jgraph/drawio

If a user-defined bridge network was created, you can delete it as follows:

docker network rm app-net

Leave a Comment

Cancel reply

Your email address will not be published.