Skip to content

drawio

circle_drawio.svg

inherite from

abcdesktopio/oc.template.ubuntu.gtk

Distribution

ubuntu ubuntu

NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Ubuntu packages

libxss1 libasound2 libx11-xcb1 libxcb-dri3-0 libdrm2  libdrm-common libgbm1 libasound2-plugins libgail-common libgtk2.0-bin

Displayname

draw.io

Path

/opt/drawio/drawio

Mimetype

application/vnd.jgraph.mxfile;application/vnd.visio;

File extensions

"drawio"

Legacy file extensions

"drawio"

ACL

{
    "permit": [
        "all"
    ]
}

WM_CLASS

draw.io.draw.io

The WM_CLASS property (of type STRING without control characters) contains two consecutive null-terminated strings. These specify the Instance and Class names to be used by both the client and the window manager for looking up resources for the application or as identifying information. to get the WM_CLASS property of an application, use the command line wmctrl -lx

Desktopfile

/usr/share/applications/drawio.desktop

A .desktop file is a simple text file that holds information about a program. It is usually placed in “/usr/share/applications/”.

POST run command

POST run command are run after the package install comman

RUN apt-get update && curl -Ls 'https://github.com/jgraph/drawio-desktop/releases/download/v20.3.0/drawio-amd64-20.3.0.deb' -o /tmp/drawio-amd64.deb && apt-get install --yes --no-install-recommends /tmp/drawio-amd64.deb && rm /tmp/drawio-amd64.deb && rm -rf /var/lib/apt/lists/*

JSON dump

json source file drawio.d.3.0.json

{
    "acl": {
        "permit": [
            "all"
        ]
    },
    "cat": "graphics",
    "debpackage": "libxss1 libasound2 libx11-xcb1 libxcb-dri3-0 libdrm2  libdrm-common libgbm1 libasound2-plugins libgail-common libgtk2.0-bin",
    "icon": "circle_drawio.svg",
    "launch": "draw.io.draw.io",
    "name": "drawio",
    "displayname": "draw.io",
    "rules": {
        "homedir": {
            "default": true
        }
    },
    "path": "/opt/drawio/drawio",
    "template": "abcdesktopio/oc.template.ubuntu.gtk",
    "mimetype": "application/vnd.jgraph.mxfile;application/vnd.visio;",
    "fileextensions": "drawio",
    "legacyfileextensions": "drawio",
    "desktopfile": "/usr/share/applications/drawio.desktop",
    "postruncommands": [
        "RUN apt-get update && curl -Ls 'https://github.com/jgraph/drawio-desktop/releases/download/v20.3.0/drawio-amd64-20.3.0.deb' -o /tmp/drawio-amd64.deb && apt-get install --yes --no-install-recommends /tmp/drawio-amd64.deb && rm /tmp/drawio-amd64.deb && rm -rf /var/lib/apt/lists/*"
    ]
}

Install the builded image

Replace the ABCHOST var set to localhost by default to your own server ip address

ABCHOST=localhost
curl --output drawio.d.3.0.json https://raw.githubusercontent.com/abcdesktopio/oc.apps/main/drawio.d.3.0.json
curl -X PUT -H 'Content-Type: text/javascript' http://$ABCHOST:30443/API/manager/image -d @drawio.d.3.0.json

Generated DockerFile source code

# Dynamic DockerFile application file for abcdesktopio generated by abcdesktopio/oc.apps/make.js
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
ARG TAG=dev
FROM abcdesktopio/oc.template.ubuntu.gtk:$TAG
USER root
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y  --no-install-recommends libxss1 libasound2 libx11-xcb1 libxcb-dri3-0 libdrm2  libdrm-common libgbm1 libasound2-plugins libgail-common libgtk2.0-bin && apt-get clean
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
LABEL oc.icon="circle_drawio.svg"
LABEL oc.icondata="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iQ2FsY3VsYXRvciIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxMDI0IDEwMjQiIGlt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xwYXRoIGQ9Im0zNS44NzcgMjUuNzc0IDkuNTg4NiAxMi40NTIiLz4KICA8L2c+CiA8L2c+Cjwvc3ZnPgo="
LABEL oc.keyword="drawio"
LABEL oc.cat="graphics"
LABEL oc.desktopfile="drawio.desktop"
LABEL oc.launch="draw.io.draw.io"
LABEL oc.template="abcdesktopio/oc.template.ubuntu.gtk"
LABEL oc.name="drawio"
LABEL oc.displayname="draw.io"
LABEL oc.path="/opt/drawio/drawio"
LABEL oc.type=app
LABEL oc.mimetype="application/vnd.jgraph.mxfile;application/vnd.visio;"
LABEL oc.fileextensions="drawio"
LABEL oc.legacyfileextensions="drawio"
LABEL oc.rules="{\"homedir\":{\"default\":true}}"
LABEL oc.acl="{\"permit\":[\"all\"]}"
RUN for d in /usr/share/icons /usr/share/pixmaps ; do echo "testing link in $d"; if [ -d $d ] && [ -x /composer/safelinks.sh ] ; then echo "fixing link in $d"; cd $d ; /composer/safelinks.sh ; fi; done
ENV APPNAME "drawio"
ENV APPBIN "/opt/drawio/drawio"
ENV APP "/opt/drawio/drawio"
RUN apt-get update && curl -Ls 'https://github.com/jgraph/drawio-desktop/releases/download/v20.3.0/drawio-amd64-20.3.0.deb' -o /tmp/drawio-amd64.deb && apt-get install --yes --no-install-recommends /tmp/drawio-amd64.deb && rm /tmp/drawio-amd64.deb && rm -rf /var/lib/apt/lists/*
USER root
RUN mkdir -p /var/secrets/abcdesktop/localaccount
RUN for f in passwd shadow group gshadow ; do if [ -f /etc/$f ] ; then  cp /etc/$f /var/secrets/abcdesktop/localaccount; rm -f /etc/$f; ln -s /var/secrets/abcdesktop/localaccount/$f /etc/$f; fi; done
USER balloon
CMD [ "/composer/appli-docker-entrypoint.sh" ]

Rebuild the image manually

Download the Dockerfile manually

Dockerfile for application drawio

wget https://raw.githubusercontent.com/abcdesktopio/oc.apps/main/drawio.d

build the Dockerfile to create a container image

docker build --build-arg TAG=3.0 -f drawio.d -t drawio .

Install the new image

If you are using containerd as container runtime, use the ctr command line

If you are not running this bash command on your abcdesktop node Replace the ABCHOST variable set to localhost by default to your own server ip address

ABCHOST=localhost
docker inspect drawio > drawio.json
docker image save drawio -o drawio.tar
ctr -n k8s.io images import drawio.tar
curl -X PUT -H 'Content-Type: text/javascript' http://$ABCHOST:30443/API/manager/image -d @drawio.json