|
5 年 前 | |
---|---|---|
.. | ||
drawio-export | 5 年 前 | |
Dockerfile | 7 年 前 | |
README.md | 5 年 前 |
This guide is based on fjudith/draw.io docker image docker-draw.io repository
#HTTPS SSL Certificate via Let's Encrypt
###Prerequisites:
###Method:
docker run -it -m1g -e LETS_ENCRYPT_ENABLED=true -e PUBLIC_DNS=drawio.example.com --rm --name="draw" -p 80:80 -p 443:8443 fjudith/draw.io
Notice that mapping port 80 to container's port 80 allows certbot to work in stand-alone mode. Mapping port 443 to container's port 8443 allows the container tomcat to serve https requests directly.#Updating draw.io in a running container
##Method 1 (Using the host machine to build draw.io):
###Prerequisites:
###Method:
wget https://github.com/jgraph/draw.io/archive/v{$version}.zip
For example, wget https://github.com/jgraph/draw.io/archive/v11.2.9.zip
unzip v11.2.9.zip
cd drawio-11.2.9/etc/build/
ant war
cd ../../build/
unzip draw.war -d draw
docker cp draw draw:/usr/local/tomcat/webapps/
##Method 2 (build a new docker image with the new version)
ARG VERSION=11.2.9
docker build -t fjudith/draw.io .
#Changing draw.io configuration
##Method 1 (Build you custom image with setting pre-loaded)
COPY PreConfig.js PostConfig.js $CATALINA_HOME/webapps/draw/js/
##Method 2 (Using existing running docker container)
docker cp PreConfig.js draw:/usr/local/tomcat/webapps/draw/js/
docker cp PostConfig.js draw:/usr/local/tomcat/webapps/draw/js/
##Method 3 (Bind configuration files into the container when started)
docker run -it --rm --name="draw" --mount type=bind,source="$(pwd)"/PreConfig.js,target=/usr/local/tomcat/webapps/draw/js/PreConfig.js --mount type=bind,source="$(pwd)"/PostConfig.js,target=/usr/local/tomcat/webapps/draw/js/PostConfig.js -p 8080:8080 -p 8443:8443 fjudith/draw.io
#draw.io with local export server
Use the docker image from drawio-export
folder. This image is much larger since it requires Node.js in addition to Puppeteer (which requires many dependencies similar to Chromium)