From cf61ff95cbdbf4691700e8be28aa96a4a3755b8a Mon Sep 17 00:00:00 2001 From: Nicolas Pernoud <github@ninico.fr> Date: Mon, 3 Oct 2022 09:33:45 +0200 Subject: [PATCH] chore: update --- Dockerfile | 26 ++++++++++++-------------- README.md | 2 +- examples/input.md | 15 ++++++--------- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index b375d94..0772d03 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,40 +1,38 @@ # # Build stage # -FROM debian:buster as build-env +FROM debian:bullseye as build-env RUN apt-get update && apt-get install -y python3-pip wget RUN pip3 install pandoc-plantuml-filter # make slim-jdk -RUN wget https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz -P /tmp/ -RUN tar xfvz /tmp/openjdk-11.0.2_linux-x64_bin.tar.gz -C /tmp/ -RUN /tmp/jdk-11.0.2/bin/jlink --output /opt/openjdk-11-slim \ +RUN wget https://download.java.net/java/GA/jdk19/877d6127e982470ba2a7faa31cc93d04/36/GPL/openjdk-19_linux-x64_bin.tar.gz -P /tmp/ +RUN tar xfvz /tmp/openjdk-19_linux-x64_bin.tar.gz -C /tmp/ +RUN /tmp/jdk-19/bin/jlink --output /opt/openjdk-19-slim \ --add-modules java.base,java.datatransfer,java.desktop,java.logging,java.prefs,java.scripting,java.xml # make plant UML -RUN mkdir -p /opt/plantuml/ -RUN wget https://managedway.dl.sourceforge.net/project/plantuml/plantuml.jar -P /opt/plantuml/ +RUN mkdir -p /opt/plantuml/ +RUN wget https://github.com/plantuml/plantuml/releases/download/v1.2022.8/plantuml-1.2022.8.jar -P /opt/plantuml/ RUN echo '#!/bin/bash\n\ - /opt/openjdk-11-slim/bin/java -jar /opt/plantuml/plantuml.jar $@' > /usr/bin/plantuml + /opt/openjdk-19-slim/bin/java -jar /opt/plantuml/plantuml-1.2022.8.jar $@' >/usr/bin/plantuml RUN chmod a+x /usr/bin/plantuml # # Run stage # -FROM debian:buster as setup-env +FROM debian:bullseye as setup-env -RUN apt-get update && apt-get install -y python3 pandoc graphviz libfreetype6 fontconfig git \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y python3 pandoc graphviz libfreetype6 fontconfig git && apt-get clean && rm -rf /var/lib/apt/lists/* RUN ln -s /usr/bin/python3 /usr/bin/python -COPY --from=build-env /usr/local/lib/python3.7/dist-packages/ /usr/local/lib/python3.7/dist-packages/ +COPY --from=build-env /usr/local/lib/python3.9/dist-packages/ /usr/local/lib/python3.9/dist-packages/ COPY --from=build-env /usr/bin/plantuml /usr/bin/plantuml COPY --from=build-env /usr/local/bin/pandoc-plantuml /usr/local/bin/pandoc-plantuml COPY --from=build-env /opt/plantuml/ /opt/plantuml/ -COPY --from=build-env /opt/openjdk-11-slim/ /opt/openjdk-11-slim/ +COPY --from=build-env /opt/openjdk-19-slim/ /opt/openjdk-19-slim/ WORKDIR /var/docs/ -ENTRYPOINT ["pandoc", "--filter", "pandoc-plantuml"] \ No newline at end of file +ENTRYPOINT ["pandoc", "--filter", "pandoc-plantuml"] diff --git a/README.md b/README.md index 5385025..68bdeb7 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Forked from https://github.com/koduki/docker-pandoc-with-plantuml ```bash docker pull koduki/pandoc -alias pandoc="docker run -it -v `pwd`:/var/docs koduki/pandoc" +alias pandoc="docker run -it -v `pwd`:/var/docs registry.forge.grandlyon.com/npernoud/docker-pandoc-with-plantuml" ``` ## Generate HTML with SVG diff --git a/examples/input.md b/examples/input.md index 105c72a..e4e4935 100644 --- a/examples/input.md +++ b/examples/input.md @@ -1,5 +1,4 @@ -Makrdown Sample -========= +# Markdown Sample This is example for Markdown with UML and ER diagram. @@ -11,12 +10,11 @@ This is example for Markdown with UML and ER diagram. ## Table -|Right | Left |Default |Center | -|------:|:-----|---------|:------:| -| 12 | 12 | 12 | 12 | -| 123 | 123 | 123 | 123 | -| 1 | 1 | 1 | 1 | - +| Right | Left | Default | Center | +| ----: | :--- | ------- | :----: | +| 12 | 12 | 12 | 12 | +| 123 | 123 | 123 | 123 | +| 1 | 1 | 1 | 1 | ## PlantUML Examples @@ -48,4 +46,3 @@ entity "entity 2" as entity2 { entity1 -----{ entity2 ``` - -- GitLab