From a0539e7b095cc2aba6bf4a78ae3b550984452c79 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 4 Apr 2024 11:03:05 +0200 Subject: [PATCH] Update to 24.2.2 Update tomcat and cleanup image --- example/diagrams.nomad.hcl | 2 +- example/images/diagrams/Dockerfile | 25 ++++++++++++++++--------- images/diagrams/Dockerfile | 21 ++++++++++++++------- variables.yml | 2 +- 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/example/diagrams.nomad.hcl b/example/diagrams.nomad.hcl index 5614446..431f7c2 100644 --- a/example/diagrams.nomad.hcl +++ b/example/diagrams.nomad.hcl @@ -69,7 +69,7 @@ job "diagrams" { driver = "docker" config { - image = "danielberteaud/diagrams:24.2.0-1" + image = "danielberteaud/diagrams:24.2.2-1" pids_limit = 200 readonly_rootfs = true volumes = [ diff --git a/example/images/diagrams/Dockerfile b/example/images/diagrams/Dockerfile index cd92639..e08c5f4 100644 --- a/example/images/diagrams/Dockerfile +++ b/example/images/diagrams/Dockerfile @@ -1,19 +1,21 @@ -FROM danielberteaud/java:17.24.3-5 +FROM danielberteaud/java:17.24.4-1 MAINTAINER Daniel Berteaud -ARG TOMCAT_VERSION=10.1.19 \ - DIAGRAMS_VERSION=24.2.0 +ARG TOMCAT_VERSION=10.1.20 \ + DIAGRAMS_VERSION=24.2.2 ENV CATALINA_HOME=/opt/tomcat \ TOMCAT_PORT=8282 \ TOMCAT_ADDRESS=0.0.0.0 +ADD https://dlcdn.apache.org/tomcat/tomcat-10/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz /tmp +ADD https://dlcdn.apache.org/tomcat/tomcat-10/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz.sha512 /tmp +ADD https://github.com/jgraph/drawio/releases/download/v${DIAGRAMS_VERSION}/draw.war /tmp RUN set -euxo pipefail &&\ cd /tmp &&\ - apk --no-cache update &&\ - apk --no-cache add bash &&\ - curl -sSLO https://dlcdn.apache.org/tomcat/tomcat-10/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz &&\ - curl -sSLO https://dlcdn.apache.org/tomcat/tomcat-10/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz.sha512 &&\ + apk --no-cache add \ + bash \ + &&\ sha512sum -c < apache-tomcat-${TOMCAT_VERSION}.tar.gz.sha512 &&\ mkdir -p /opt/tomcat &&\ tar xvzf apache-tomcat-${TOMCAT_VERSION}.tar.gz --strip-components 1 --directory ${CATALINA_HOME} &&\ @@ -21,11 +23,16 @@ RUN set -euxo pipefail &&\ find /opt/tomcat -type f -exec chmod 644 "{}" \; &&\ chmod +x /opt/tomcat/bin/* &&\ rm -f apache-tomcat-${TOMCAT_VERSION}.tar.gz.sha512 apache-tomcat-${TOMCAT_VERSION}.tar.gz &&\ - curl -sSLO https://github.com/jgraph/drawio/releases/download/v${DIAGRAMS_VERSION}/draw.war &&\ unzip draw.war -d ${CATALINA_HOME}/webapps/draw &&\ rm -f draw.war &&\ addgroup --gid 8282 diagrams &&\ - adduser --system --ingroup diagrams --disabled-password --uid 8282 --home ${CATALINA_HOME} --shell /sbin/nologin diagrams + adduser --system \ + --ingroup diagrams \ + --disabled-password \ + --uid 8282 \ + --home ${CATALINA_HOME} \ + --shell /sbin/nologin \ + diagrams COPY root/ / diff --git a/images/diagrams/Dockerfile b/images/diagrams/Dockerfile index 814f1d2..f0fd51e 100644 --- a/images/diagrams/Dockerfile +++ b/images/diagrams/Dockerfile @@ -1,19 +1,21 @@ FROM [[ .docker.repo ]][[ .docker.base_images.java17.image ]] MAINTAINER [[ .docker.maintainer ]] -ARG TOMCAT_VERSION=10.1.19 \ +ARG TOMCAT_VERSION=10.1.20 \ DIAGRAMS_VERSION=[[ .diagrams.version ]] ENV CATALINA_HOME=/opt/tomcat \ TOMCAT_PORT=8282 \ TOMCAT_ADDRESS=0.0.0.0 +ADD https://dlcdn.apache.org/tomcat/tomcat-10/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz /tmp +ADD https://dlcdn.apache.org/tomcat/tomcat-10/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz.sha512 /tmp +ADD https://github.com/jgraph/drawio/releases/download/v${DIAGRAMS_VERSION}/draw.war /tmp RUN set -euxo pipefail &&\ cd /tmp &&\ - apk --no-cache update &&\ - apk --no-cache add bash &&\ - curl -sSLO https://dlcdn.apache.org/tomcat/tomcat-10/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz &&\ - curl -sSLO https://dlcdn.apache.org/tomcat/tomcat-10/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz.sha512 &&\ + apk --no-cache add \ + bash \ + &&\ sha512sum -c < apache-tomcat-${TOMCAT_VERSION}.tar.gz.sha512 &&\ mkdir -p /opt/tomcat &&\ tar xvzf apache-tomcat-${TOMCAT_VERSION}.tar.gz --strip-components 1 --directory ${CATALINA_HOME} &&\ @@ -21,11 +23,16 @@ RUN set -euxo pipefail &&\ find /opt/tomcat -type f -exec chmod 644 "{}" \; &&\ chmod +x /opt/tomcat/bin/* &&\ rm -f apache-tomcat-${TOMCAT_VERSION}.tar.gz.sha512 apache-tomcat-${TOMCAT_VERSION}.tar.gz &&\ - curl -sSLO https://github.com/jgraph/drawio/releases/download/v${DIAGRAMS_VERSION}/draw.war &&\ unzip draw.war -d ${CATALINA_HOME}/webapps/draw &&\ rm -f draw.war &&\ addgroup --gid 8282 diagrams &&\ - adduser --system --ingroup diagrams --disabled-password --uid 8282 --home ${CATALINA_HOME} --shell /sbin/nologin diagrams + adduser --system \ + --ingroup diagrams \ + --disabled-password \ + --uid 8282 \ + --home ${CATALINA_HOME} \ + --shell /sbin/nologin \ + diagrams COPY root/ / diff --git a/variables.yml b/variables.yml index 5dda414..72f247f 100644 --- a/variables.yml +++ b/variables.yml @@ -2,7 +2,7 @@ instance: diagrams diagrams: - version: 24.2.0 + version: 24.2.2 image: '[[ .docker.repo ]]diagrams:[[ .diagrams.version ]]-1' env: {} public_url: https://draw.example.org