From 7ac60b627eea8367d41702687fc756baf2142111 Mon Sep 17 00:00:00 2001 From: "Kevin S. Clarke" Date: Tue, 17 Oct 2023 11:06:07 -0400 Subject: [PATCH] [SERV-938] Update packages and base image (#156) * Update packages and base image * Make Codacy's Dockerfile check happy --- pom.xml | 28 ++++++++++++------------ src/main/docker/Dockerfile | 20 ++++++++--------- src/main/docker/scripts/show_versions.sh | 4 ++-- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/pom.xml b/pom.xml index 4080680..9bf8921 100644 --- a/pom.xml +++ b/pom.xml @@ -74,20 +74,20 @@ - 20.04 - 11.0.20+8-1ubuntu1~20.04 - 4:9.3.0-1ubuntu2 - 4.2.1-1.2 - 4.1.0+git191117-2ubuntu0.20.04.9 - 12.8ubuntu1.1 - 2.3.1-1ubuntu4.20.04.1 - 2.0.3-0ubuntu1.20.04.3 - 6.0-25ubuntu1.1 - 3.0-11build1 - 7.68.0-1ubuntu2.19 - 7:4.2.7-0ubuntu0.1 - 2.7.17-2ubuntu4 - 9.1.0 + 22.04 + 17.0.8.1+1~us1-0ubuntu1~22.04 + 4:11.2.0-1ubuntu1 + 4.3-4.1build1 + 4.3.0-6ubuntu0.6 + 12.9ubuntu3 + 2.4.0-6 + 2.1.2-0ubuntu1 + 6.0-26ubuntu3.1 + 3.0-12build2 + 7.81.0-1ubuntu1.14 + 7:4.4.2-0ubuntu0.22.04.1 + 2.7.18-3 + 11.0.0 3.0.1 diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile index e366521..757f255 100644 --- a/src/main/docker/Dockerfile +++ b/src/main/docker/Dockerfile @@ -1,6 +1,6 @@ # We do a multi-stage build; the first stage builds the Cantaloupe code -FROM maven:3.6.3-jdk-11 AS MAVEN_TOOL_CHAIN +FROM maven:3.9.4-eclipse-temurin-17 AS MAVEN_TOOL_CHAIN # Where we find the stable Cantaloupe Jar file ENV CANTALOUPE_RELEASES="https://github.com/cantaloupe-project/cantaloupe/releases/download" @@ -57,14 +57,14 @@ RUN if [ "${cantaloupe.version}" = "dev" ] ; then \ # The second stage of our multi-stage build builds the kakadu libraries and binaries FROM ubuntu:${ubuntu.tag} AS KAKADU_TOOL_CHAIN -ENV JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64" +ENV JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64" COPY kakadu /build/kakadu/ RUN if [ ! -z "${kakadu.version}" ]; then \ cd /build/kakadu/"${kakadu.version}"/make && \ apt-get update -qq && \ DEBIAN_FRONTEND=noninteractive apt-get install -qq --no-install-recommends \ - openjdk-11-jdk-headless=${openjdk.version}\ + openjdk-17-jdk-headless=${openjdk.version}\ gcc=${gcc.version} \ make=${make.version} \ libtiff-tools=${libtiff.version} \ @@ -113,7 +113,7 @@ RUN apt-get update -qq && \ libtiff5-dev=${libtiff.version} \ libopenjp2-tools=${libopenjp2.version} \ libturbojpeg=${libturbojpeg.version} \ - openjdk-11-jre-headless=${openjdk.version} \ + openjdk-17-jre-headless=${openjdk.version} \ unzip=${unzip.version} \ zip=${zip.version} \ curl=${curl.version} \ @@ -174,12 +174,12 @@ RUN mkdir -p /var/log/cantaloupe /var/cache/cantaloupe && \ # Install grok JPEG-2000 library and tools WORKDIR /tmp ARG GROK_RELEASES="https://github.com/GrokImageCompression/grok/releases" -RUN curl -sL ${GROK_RELEASES}/download/v${grok.version}/grok-v${grok.version}-linux-amd64.tar.gz > grok.tar.gz && \ - tar zxfv grok.tar.gz && \ - cp ./grok-v${grok.version}-linux-amd64/bin/grk_* /usr/bin && \ - cp ./grok-v${grok.version}-linux-amd64/lib/*libgrok* /usr/lib && \ - cp -r ./grok-v${grok.version}-linux-amd64/include/grok* /usr/include && \ - rm -rf /tmp/grok-v${grok.version}-linux-amd64 grok-v${grok.version}-linux-amd64.tar.gz +RUN curl -sL "${GROK_RELEASES}/download/v${grok.version}/grok-ubuntu-latest.zip" > grok.zip && \ + unzip grok.zip && \ + cp ./grok-ubuntu-latest/bin/grk_* /usr/bin && \ + cp ./grok-ubuntu-latest/lib/*libgrok* /usr/lib && \ + cp -r ./grok-ubuntu-latest/include/grok* /usr/include && \ + rm -rf /tmp/grok-ubuntu-latest grok.zip # Set up logging, keeping a separate log for just the errors (in addition to the full log) ENV CANTALOUPE_LOG_APPLICATION_ROLLINGFILEAPPENDER_PATHNAME=/var/log/cantaloupe/application.log diff --git a/src/main/docker/scripts/show_versions.sh b/src/main/docker/scripts/show_versions.sh index b3b462d..9fcbf12 100755 --- a/src/main/docker/scripts/show_versions.sh +++ b/src/main/docker/scripts/show_versions.sh @@ -14,8 +14,8 @@ print_line() { } declare -a DEPENDENCIES=( - "openjdk-11-jdk-headless" - "openjdk-11-jre-headless" + "openjdk-17-jdk-headless" + "openjdk-17-jre-headless" "gcc" "python2" "ffmpeg"