From 20ecb5812c149f4794b34732a3dd0458ecbfbb39 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Sat, 20 Jan 2024 06:41:15 +0200
Subject: [PATCH] Install diagrams from PyPI.

The Debian package currently is uninstallable due to a missing
dependency (python3-typed-ast).
---
 Dockerfile | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index acd940a..a165e01 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -5,7 +5,7 @@ RUN go install github.com/spelufo/on-change@latest && \
 # hadolint ignore=DL3007
 FROM registry.shore.co.il/toolbx:latest
 COPY --from=golang /go/bin/on-change /go/bin/ttyrec2gif /usr/local/bin/
-# hadolint ignore=DL3008
+# hadolint ignore=DL3008,DL3013
 RUN apt-get update && \
     DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
         fonts-font-awesome \
@@ -21,7 +21,7 @@ RUN apt-get update && \
         mandoc \
         pandoc \
         poppler-utils \
-        python3-diagrams \
+        python3-pip \
         texlive-extra-utils \
         texlive-fonts-extra \
         texlive-fonts-recommended \
@@ -35,7 +35,10 @@ RUN apt-get update && \
         texlive-xetex \
         qpdf \
     && \
-    rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/archives/*
+    python3 -m pip install --no-cache-dir --break-system-packages \
+        diagrams \
+    && \
+    rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/archives/* ~/.cache/*
 ENTRYPOINT [ "/usr/local/sbin/runas" ]
 CMD [ "on-change", ".", "make" ]
 VOLUME /volume
-- 
GitLab