-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
48 lines (38 loc) · 1.31 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM debian:bullseye
ARG TARGETARCH
WORKDIR "/opt/drawio-desktop"
RUN <<EOF
set -e
echo "selected arch: ${TARGETARCH}"
# Deps
apt-get update
apt-get install -y xvfb wget libgbm1 libasound2
# Drawio Desktop
DRAWIO_VERSION="25.0.2"
wget -q https://github.com/jgraph/drawio-desktop/releases/download/v${DRAWIO_VERSION}/drawio-${TARGETARCH}-${DRAWIO_VERSION}.deb
apt-get install -y /opt/drawio-desktop/drawio-${TARGETARCH}-${DRAWIO_VERSION}.deb
rm -rf /opt/drawio-desktop/drawio-${TARGETARCH}-${DRAWIO_VERSION}.deb
# Additional Fonts
apt-get install -y fonts-liberation \
fonts-arphic-ukai fonts-arphic-uming \
fonts-noto fonts-noto-cjk \
fonts-ipafont-mincho fonts-ipafont-gothic \
fonts-unfonts-core
# Cleanup layer
apt-get remove -y wget
rm -rf /var/lib/apt/lists/*
# Enable all users to write in the WORKDIR folder
chmod a+w .
EOF
COPY --chmod=755 src/* ./
ENV ELECTRON_DISABLE_SECURITY_WARNINGS "true"
ENV DRAWIO_DISABLE_UPDATE "true"
ENV DRAWIO_DESKTOP_COMMAND_TIMEOUT "10s"
ENV DRAWIO_DESKTOP_EXECUTABLE_PATH "/opt/drawio/drawio"
ENV DRAWIO_DESKTOP_SOURCE_FOLDER "/opt/drawio-desktop"
ENV DRAWIO_DESKTOP_RUNNER_COMMAND_LINE "/opt/drawio-desktop/runner.sh"
ENV XVFB_DISPLAY ":42"
ENV XVFB_OPTIONS "-nolisten unix"
ENV ELECTRON_ENABLE_LOGGING "false"
ENTRYPOINT [ "/opt/drawio-desktop/entrypoint.sh" ]
CMD [ "--help" ]