From 1dbc4686bd41281a46be09cabce7bf3c01215505 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 2 May 2022 13:03:44 -0700 Subject: [PATCH] Update 10.0 --- 10.0/jdk17/openjdk-bullseye/Dockerfile | 150 -------------------- 10.0/jdk17/openjdk-buster/Dockerfile | 150 -------------------- 10.0/jdk17/openjdk-slim-bullseye/Dockerfile | 150 -------------------- 10.0/jdk17/openjdk-slim-buster/Dockerfile | 150 -------------------- versions.json | 4 - 5 files changed, 604 deletions(-) delete mode 100644 10.0/jdk17/openjdk-bullseye/Dockerfile delete mode 100644 10.0/jdk17/openjdk-buster/Dockerfile delete mode 100644 10.0/jdk17/openjdk-slim-bullseye/Dockerfile delete mode 100644 10.0/jdk17/openjdk-slim-buster/Dockerfile diff --git a/10.0/jdk17/openjdk-bullseye/Dockerfile b/10.0/jdk17/openjdk-bullseye/Dockerfile deleted file mode 100644 index 1538984fd..000000000 --- a/10.0/jdk17/openjdk-bullseye/Dockerfile +++ /dev/null @@ -1,150 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM openjdk:17-jdk-bullseye - -ENV CATALINA_HOME /usr/local/tomcat -ENV PATH $CATALINA_HOME/bin:$PATH -RUN mkdir -p "$CATALINA_HOME" -WORKDIR $CATALINA_HOME - -# let "Tomcat Native" live somewhere isolated -ENV TOMCAT_NATIVE_LIBDIR $CATALINA_HOME/native-jni-lib -ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOMCAT_NATIVE_LIBDIR - -# see https://www.apache.org/dist/tomcat/tomcat-10/KEYS -# see also "versions.sh" (https://github.com/docker-library/tomcat/blob/master/versions.sh) -ENV GPG_KEYS A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 - -ENV TOMCAT_MAJOR 10 -ENV TOMCAT_VERSION 10.0.20 -ENV TOMCAT_SHA512 53bfdbac2e6af5cca97dc01fffb0428380fbe21d8375f45d015c16a57017ff946fdc555ebad9e9fcbcb97b438c4f6daf3aa39d36ca79fd5a372cfc1a80b7117f - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - dirmngr \ - gnupg \ - ; \ - \ - ddist() { \ - local f="$1"; shift; \ - local distFile="$1"; shift; \ - local mvnFile="${1:-}"; \ - local success=; \ - local distUrl=; \ - for distUrl in \ -# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 - "https://www.apache.org/dyn/closer.cgi?action=download&filename=$distFile" \ -# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ - "https://downloads.apache.org/$distFile" \ - "https://www-us.apache.org/dist/$distFile" \ - "https://www.apache.org/dist/$distFile" \ - "https://archive.apache.org/dist/$distFile" \ -# if all else fails, let's try Maven (https://www.mail-archive.com/users@tomcat.apache.org/msg134940.html; https://mvnrepository.com/artifact/org.apache.tomcat/tomcat; https://repo1.maven.org/maven2/org/apache/tomcat/tomcat/) - ${mvnFile:+"https://repo1.maven.org/maven2/org/apache/tomcat/tomcat/$mvnFile"} \ - ; do \ - if curl -fL -o "$f" "$distUrl" && [ -s "$f" ]; then \ - success=1; \ - break; \ - fi; \ - done; \ - [ -n "$success" ]; \ - }; \ - \ - ddist 'tomcat.tar.gz' "tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz" "$TOMCAT_VERSION/tomcat-$TOMCAT_VERSION.tar.gz"; \ - echo "$TOMCAT_SHA512 *tomcat.tar.gz" | sha512sum --strict --check -; \ - ddist 'tomcat.tar.gz.asc' "tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz.asc" "$TOMCAT_VERSION/tomcat-$TOMCAT_VERSION.tar.gz.asc"; \ - export GNUPGHOME="$(mktemp -d)"; \ - for key in $GPG_KEYS; do \ - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ - done; \ - gpg --batch --verify tomcat.tar.gz.asc tomcat.tar.gz; \ - tar -xf tomcat.tar.gz --strip-components=1; \ - rm bin/*.bat; \ - rm tomcat.tar.gz*; \ - command -v gpgconf && gpgconf --kill all || :; \ - rm -rf "$GNUPGHOME"; \ - \ -# https://tomcat.apache.org/tomcat-9.0-doc/security-howto.html#Default_web_applications - mv webapps webapps.dist; \ - mkdir webapps; \ -# we don't delete them completely because they're frankly a pain to get back for users who do want them, and they're generally tiny (~7MB) - \ - nativeBuildDir="$(mktemp -d)"; \ - tar -xf bin/tomcat-native.tar.gz -C "$nativeBuildDir" --strip-components=1; \ - apt-get install -y --no-install-recommends \ - dpkg-dev \ - gcc \ - libapr1-dev \ - libssl-dev \ - make \ - ; \ - ( \ - export CATALINA_HOME="$PWD"; \ - cd "$nativeBuildDir/native"; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - aprConfig="$(command -v apr-1-config)"; \ - ./configure \ - --build="$gnuArch" \ - --libdir="$TOMCAT_NATIVE_LIBDIR" \ - --prefix="$CATALINA_HOME" \ - --with-apr="$aprConfig" \ - --with-java-home="$JAVA_HOME" \ - --with-ssl=yes \ - ; \ - nproc="$(nproc)"; \ - make -j "$nproc"; \ - make install; \ - ); \ - rm -rf "$nativeBuildDir"; \ - rm bin/tomcat-native.tar.gz; \ - \ -# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - find "$TOMCAT_NATIVE_LIBDIR" -type f -executable -exec ldd '{}' ';' \ - | awk '/=>/ { print $(NF-1) }' \ - | xargs -rt readlink -e \ - | sort -u \ - | xargs -rt dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | tee "$TOMCAT_NATIVE_LIBDIR/.dependencies.txt" \ - | xargs -r apt-mark manual \ - ; \ - \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ -# sh removes env vars it doesn't support (ones with periods) -# https://github.com/docker-library/tomcat/issues/77 - find ./bin/ -name '*.sh' -exec sed -ri 's|^#!/bin/sh$|#!/usr/bin/env bash|' '{}' +; \ - \ -# fix permissions (especially for running as non-root) -# https://github.com/docker-library/tomcat/issues/35 - chmod -R +rX .; \ - chmod 777 logs temp work; \ - \ -# smoke test - catalina.sh version - -# verify Tomcat Native is working properly -RUN set -eux; \ - nativeLines="$(catalina.sh configtest 2>&1)"; \ - nativeLines="$(echo "$nativeLines" | grep 'Apache Tomcat Native')"; \ - nativeLines="$(echo "$nativeLines" | sort -u)"; \ - if ! echo "$nativeLines" | grep -E 'INFO: Loaded( APR based)? Apache Tomcat Native library' >&2; then \ - echo >&2 "$nativeLines"; \ - exit 1; \ - fi - -EXPOSE 8080 -CMD ["catalina.sh", "run"] diff --git a/10.0/jdk17/openjdk-buster/Dockerfile b/10.0/jdk17/openjdk-buster/Dockerfile deleted file mode 100644 index acbb9331f..000000000 --- a/10.0/jdk17/openjdk-buster/Dockerfile +++ /dev/null @@ -1,150 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM openjdk:17-jdk-buster - -ENV CATALINA_HOME /usr/local/tomcat -ENV PATH $CATALINA_HOME/bin:$PATH -RUN mkdir -p "$CATALINA_HOME" -WORKDIR $CATALINA_HOME - -# let "Tomcat Native" live somewhere isolated -ENV TOMCAT_NATIVE_LIBDIR $CATALINA_HOME/native-jni-lib -ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOMCAT_NATIVE_LIBDIR - -# see https://www.apache.org/dist/tomcat/tomcat-10/KEYS -# see also "versions.sh" (https://github.com/docker-library/tomcat/blob/master/versions.sh) -ENV GPG_KEYS A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 - -ENV TOMCAT_MAJOR 10 -ENV TOMCAT_VERSION 10.0.20 -ENV TOMCAT_SHA512 53bfdbac2e6af5cca97dc01fffb0428380fbe21d8375f45d015c16a57017ff946fdc555ebad9e9fcbcb97b438c4f6daf3aa39d36ca79fd5a372cfc1a80b7117f - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - dirmngr \ - gnupg \ - ; \ - \ - ddist() { \ - local f="$1"; shift; \ - local distFile="$1"; shift; \ - local mvnFile="${1:-}"; \ - local success=; \ - local distUrl=; \ - for distUrl in \ -# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 - "https://www.apache.org/dyn/closer.cgi?action=download&filename=$distFile" \ -# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ - "https://downloads.apache.org/$distFile" \ - "https://www-us.apache.org/dist/$distFile" \ - "https://www.apache.org/dist/$distFile" \ - "https://archive.apache.org/dist/$distFile" \ -# if all else fails, let's try Maven (https://www.mail-archive.com/users@tomcat.apache.org/msg134940.html; https://mvnrepository.com/artifact/org.apache.tomcat/tomcat; https://repo1.maven.org/maven2/org/apache/tomcat/tomcat/) - ${mvnFile:+"https://repo1.maven.org/maven2/org/apache/tomcat/tomcat/$mvnFile"} \ - ; do \ - if curl -fL -o "$f" "$distUrl" && [ -s "$f" ]; then \ - success=1; \ - break; \ - fi; \ - done; \ - [ -n "$success" ]; \ - }; \ - \ - ddist 'tomcat.tar.gz' "tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz" "$TOMCAT_VERSION/tomcat-$TOMCAT_VERSION.tar.gz"; \ - echo "$TOMCAT_SHA512 *tomcat.tar.gz" | sha512sum --strict --check -; \ - ddist 'tomcat.tar.gz.asc' "tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz.asc" "$TOMCAT_VERSION/tomcat-$TOMCAT_VERSION.tar.gz.asc"; \ - export GNUPGHOME="$(mktemp -d)"; \ - for key in $GPG_KEYS; do \ - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ - done; \ - gpg --batch --verify tomcat.tar.gz.asc tomcat.tar.gz; \ - tar -xf tomcat.tar.gz --strip-components=1; \ - rm bin/*.bat; \ - rm tomcat.tar.gz*; \ - command -v gpgconf && gpgconf --kill all || :; \ - rm -rf "$GNUPGHOME"; \ - \ -# https://tomcat.apache.org/tomcat-9.0-doc/security-howto.html#Default_web_applications - mv webapps webapps.dist; \ - mkdir webapps; \ -# we don't delete them completely because they're frankly a pain to get back for users who do want them, and they're generally tiny (~7MB) - \ - nativeBuildDir="$(mktemp -d)"; \ - tar -xf bin/tomcat-native.tar.gz -C "$nativeBuildDir" --strip-components=1; \ - apt-get install -y --no-install-recommends \ - dpkg-dev \ - gcc \ - libapr1-dev \ - libssl-dev \ - make \ - ; \ - ( \ - export CATALINA_HOME="$PWD"; \ - cd "$nativeBuildDir/native"; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - aprConfig="$(command -v apr-1-config)"; \ - ./configure \ - --build="$gnuArch" \ - --libdir="$TOMCAT_NATIVE_LIBDIR" \ - --prefix="$CATALINA_HOME" \ - --with-apr="$aprConfig" \ - --with-java-home="$JAVA_HOME" \ - --with-ssl=yes \ - ; \ - nproc="$(nproc)"; \ - make -j "$nproc"; \ - make install; \ - ); \ - rm -rf "$nativeBuildDir"; \ - rm bin/tomcat-native.tar.gz; \ - \ -# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - find "$TOMCAT_NATIVE_LIBDIR" -type f -executable -exec ldd '{}' ';' \ - | awk '/=>/ { print $(NF-1) }' \ - | xargs -rt readlink -e \ - | sort -u \ - | xargs -rt dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | tee "$TOMCAT_NATIVE_LIBDIR/.dependencies.txt" \ - | xargs -r apt-mark manual \ - ; \ - \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ -# sh removes env vars it doesn't support (ones with periods) -# https://github.com/docker-library/tomcat/issues/77 - find ./bin/ -name '*.sh' -exec sed -ri 's|^#!/bin/sh$|#!/usr/bin/env bash|' '{}' +; \ - \ -# fix permissions (especially for running as non-root) -# https://github.com/docker-library/tomcat/issues/35 - chmod -R +rX .; \ - chmod 777 logs temp work; \ - \ -# smoke test - catalina.sh version - -# verify Tomcat Native is working properly -RUN set -eux; \ - nativeLines="$(catalina.sh configtest 2>&1)"; \ - nativeLines="$(echo "$nativeLines" | grep 'Apache Tomcat Native')"; \ - nativeLines="$(echo "$nativeLines" | sort -u)"; \ - if ! echo "$nativeLines" | grep -E 'INFO: Loaded( APR based)? Apache Tomcat Native library' >&2; then \ - echo >&2 "$nativeLines"; \ - exit 1; \ - fi - -EXPOSE 8080 -CMD ["catalina.sh", "run"] diff --git a/10.0/jdk17/openjdk-slim-bullseye/Dockerfile b/10.0/jdk17/openjdk-slim-bullseye/Dockerfile deleted file mode 100644 index 2b69bd5ee..000000000 --- a/10.0/jdk17/openjdk-slim-bullseye/Dockerfile +++ /dev/null @@ -1,150 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM openjdk:17-jdk-slim-bullseye - -ENV CATALINA_HOME /usr/local/tomcat -ENV PATH $CATALINA_HOME/bin:$PATH -RUN mkdir -p "$CATALINA_HOME" -WORKDIR $CATALINA_HOME - -# let "Tomcat Native" live somewhere isolated -ENV TOMCAT_NATIVE_LIBDIR $CATALINA_HOME/native-jni-lib -ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOMCAT_NATIVE_LIBDIR - -# see https://www.apache.org/dist/tomcat/tomcat-10/KEYS -# see also "versions.sh" (https://github.com/docker-library/tomcat/blob/master/versions.sh) -ENV GPG_KEYS A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 - -ENV TOMCAT_MAJOR 10 -ENV TOMCAT_VERSION 10.0.20 -ENV TOMCAT_SHA512 53bfdbac2e6af5cca97dc01fffb0428380fbe21d8375f45d015c16a57017ff946fdc555ebad9e9fcbcb97b438c4f6daf3aa39d36ca79fd5a372cfc1a80b7117f - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - dirmngr \ - gnupg \ - ; \ - \ - ddist() { \ - local f="$1"; shift; \ - local distFile="$1"; shift; \ - local mvnFile="${1:-}"; \ - local success=; \ - local distUrl=; \ - for distUrl in \ -# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 - "https://www.apache.org/dyn/closer.cgi?action=download&filename=$distFile" \ -# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ - "https://downloads.apache.org/$distFile" \ - "https://www-us.apache.org/dist/$distFile" \ - "https://www.apache.org/dist/$distFile" \ - "https://archive.apache.org/dist/$distFile" \ -# if all else fails, let's try Maven (https://www.mail-archive.com/users@tomcat.apache.org/msg134940.html; https://mvnrepository.com/artifact/org.apache.tomcat/tomcat; https://repo1.maven.org/maven2/org/apache/tomcat/tomcat/) - ${mvnFile:+"https://repo1.maven.org/maven2/org/apache/tomcat/tomcat/$mvnFile"} \ - ; do \ - if curl -fL -o "$f" "$distUrl" && [ -s "$f" ]; then \ - success=1; \ - break; \ - fi; \ - done; \ - [ -n "$success" ]; \ - }; \ - \ - ddist 'tomcat.tar.gz' "tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz" "$TOMCAT_VERSION/tomcat-$TOMCAT_VERSION.tar.gz"; \ - echo "$TOMCAT_SHA512 *tomcat.tar.gz" | sha512sum --strict --check -; \ - ddist 'tomcat.tar.gz.asc' "tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz.asc" "$TOMCAT_VERSION/tomcat-$TOMCAT_VERSION.tar.gz.asc"; \ - export GNUPGHOME="$(mktemp -d)"; \ - for key in $GPG_KEYS; do \ - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ - done; \ - gpg --batch --verify tomcat.tar.gz.asc tomcat.tar.gz; \ - tar -xf tomcat.tar.gz --strip-components=1; \ - rm bin/*.bat; \ - rm tomcat.tar.gz*; \ - command -v gpgconf && gpgconf --kill all || :; \ - rm -rf "$GNUPGHOME"; \ - \ -# https://tomcat.apache.org/tomcat-9.0-doc/security-howto.html#Default_web_applications - mv webapps webapps.dist; \ - mkdir webapps; \ -# we don't delete them completely because they're frankly a pain to get back for users who do want them, and they're generally tiny (~7MB) - \ - nativeBuildDir="$(mktemp -d)"; \ - tar -xf bin/tomcat-native.tar.gz -C "$nativeBuildDir" --strip-components=1; \ - apt-get install -y --no-install-recommends \ - dpkg-dev \ - gcc \ - libapr1-dev \ - libssl-dev \ - make \ - ; \ - ( \ - export CATALINA_HOME="$PWD"; \ - cd "$nativeBuildDir/native"; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - aprConfig="$(command -v apr-1-config)"; \ - ./configure \ - --build="$gnuArch" \ - --libdir="$TOMCAT_NATIVE_LIBDIR" \ - --prefix="$CATALINA_HOME" \ - --with-apr="$aprConfig" \ - --with-java-home="$JAVA_HOME" \ - --with-ssl=yes \ - ; \ - nproc="$(nproc)"; \ - make -j "$nproc"; \ - make install; \ - ); \ - rm -rf "$nativeBuildDir"; \ - rm bin/tomcat-native.tar.gz; \ - \ -# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - find "$TOMCAT_NATIVE_LIBDIR" -type f -executable -exec ldd '{}' ';' \ - | awk '/=>/ { print $(NF-1) }' \ - | xargs -rt readlink -e \ - | sort -u \ - | xargs -rt dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | tee "$TOMCAT_NATIVE_LIBDIR/.dependencies.txt" \ - | xargs -r apt-mark manual \ - ; \ - \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ -# sh removes env vars it doesn't support (ones with periods) -# https://github.com/docker-library/tomcat/issues/77 - find ./bin/ -name '*.sh' -exec sed -ri 's|^#!/bin/sh$|#!/usr/bin/env bash|' '{}' +; \ - \ -# fix permissions (especially for running as non-root) -# https://github.com/docker-library/tomcat/issues/35 - chmod -R +rX .; \ - chmod 777 logs temp work; \ - \ -# smoke test - catalina.sh version - -# verify Tomcat Native is working properly -RUN set -eux; \ - nativeLines="$(catalina.sh configtest 2>&1)"; \ - nativeLines="$(echo "$nativeLines" | grep 'Apache Tomcat Native')"; \ - nativeLines="$(echo "$nativeLines" | sort -u)"; \ - if ! echo "$nativeLines" | grep -E 'INFO: Loaded( APR based)? Apache Tomcat Native library' >&2; then \ - echo >&2 "$nativeLines"; \ - exit 1; \ - fi - -EXPOSE 8080 -CMD ["catalina.sh", "run"] diff --git a/10.0/jdk17/openjdk-slim-buster/Dockerfile b/10.0/jdk17/openjdk-slim-buster/Dockerfile deleted file mode 100644 index 1fd8309be..000000000 --- a/10.0/jdk17/openjdk-slim-buster/Dockerfile +++ /dev/null @@ -1,150 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM openjdk:17-jdk-slim-buster - -ENV CATALINA_HOME /usr/local/tomcat -ENV PATH $CATALINA_HOME/bin:$PATH -RUN mkdir -p "$CATALINA_HOME" -WORKDIR $CATALINA_HOME - -# let "Tomcat Native" live somewhere isolated -ENV TOMCAT_NATIVE_LIBDIR $CATALINA_HOME/native-jni-lib -ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOMCAT_NATIVE_LIBDIR - -# see https://www.apache.org/dist/tomcat/tomcat-10/KEYS -# see also "versions.sh" (https://github.com/docker-library/tomcat/blob/master/versions.sh) -ENV GPG_KEYS A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 - -ENV TOMCAT_MAJOR 10 -ENV TOMCAT_VERSION 10.0.20 -ENV TOMCAT_SHA512 53bfdbac2e6af5cca97dc01fffb0428380fbe21d8375f45d015c16a57017ff946fdc555ebad9e9fcbcb97b438c4f6daf3aa39d36ca79fd5a372cfc1a80b7117f - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - dirmngr \ - gnupg \ - ; \ - \ - ddist() { \ - local f="$1"; shift; \ - local distFile="$1"; shift; \ - local mvnFile="${1:-}"; \ - local success=; \ - local distUrl=; \ - for distUrl in \ -# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 - "https://www.apache.org/dyn/closer.cgi?action=download&filename=$distFile" \ -# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ - "https://downloads.apache.org/$distFile" \ - "https://www-us.apache.org/dist/$distFile" \ - "https://www.apache.org/dist/$distFile" \ - "https://archive.apache.org/dist/$distFile" \ -# if all else fails, let's try Maven (https://www.mail-archive.com/users@tomcat.apache.org/msg134940.html; https://mvnrepository.com/artifact/org.apache.tomcat/tomcat; https://repo1.maven.org/maven2/org/apache/tomcat/tomcat/) - ${mvnFile:+"https://repo1.maven.org/maven2/org/apache/tomcat/tomcat/$mvnFile"} \ - ; do \ - if curl -fL -o "$f" "$distUrl" && [ -s "$f" ]; then \ - success=1; \ - break; \ - fi; \ - done; \ - [ -n "$success" ]; \ - }; \ - \ - ddist 'tomcat.tar.gz' "tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz" "$TOMCAT_VERSION/tomcat-$TOMCAT_VERSION.tar.gz"; \ - echo "$TOMCAT_SHA512 *tomcat.tar.gz" | sha512sum --strict --check -; \ - ddist 'tomcat.tar.gz.asc' "tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz.asc" "$TOMCAT_VERSION/tomcat-$TOMCAT_VERSION.tar.gz.asc"; \ - export GNUPGHOME="$(mktemp -d)"; \ - for key in $GPG_KEYS; do \ - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ - done; \ - gpg --batch --verify tomcat.tar.gz.asc tomcat.tar.gz; \ - tar -xf tomcat.tar.gz --strip-components=1; \ - rm bin/*.bat; \ - rm tomcat.tar.gz*; \ - command -v gpgconf && gpgconf --kill all || :; \ - rm -rf "$GNUPGHOME"; \ - \ -# https://tomcat.apache.org/tomcat-9.0-doc/security-howto.html#Default_web_applications - mv webapps webapps.dist; \ - mkdir webapps; \ -# we don't delete them completely because they're frankly a pain to get back for users who do want them, and they're generally tiny (~7MB) - \ - nativeBuildDir="$(mktemp -d)"; \ - tar -xf bin/tomcat-native.tar.gz -C "$nativeBuildDir" --strip-components=1; \ - apt-get install -y --no-install-recommends \ - dpkg-dev \ - gcc \ - libapr1-dev \ - libssl-dev \ - make \ - ; \ - ( \ - export CATALINA_HOME="$PWD"; \ - cd "$nativeBuildDir/native"; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - aprConfig="$(command -v apr-1-config)"; \ - ./configure \ - --build="$gnuArch" \ - --libdir="$TOMCAT_NATIVE_LIBDIR" \ - --prefix="$CATALINA_HOME" \ - --with-apr="$aprConfig" \ - --with-java-home="$JAVA_HOME" \ - --with-ssl=yes \ - ; \ - nproc="$(nproc)"; \ - make -j "$nproc"; \ - make install; \ - ); \ - rm -rf "$nativeBuildDir"; \ - rm bin/tomcat-native.tar.gz; \ - \ -# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - find "$TOMCAT_NATIVE_LIBDIR" -type f -executable -exec ldd '{}' ';' \ - | awk '/=>/ { print $(NF-1) }' \ - | xargs -rt readlink -e \ - | sort -u \ - | xargs -rt dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | tee "$TOMCAT_NATIVE_LIBDIR/.dependencies.txt" \ - | xargs -r apt-mark manual \ - ; \ - \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ -# sh removes env vars it doesn't support (ones with periods) -# https://github.com/docker-library/tomcat/issues/77 - find ./bin/ -name '*.sh' -exec sed -ri 's|^#!/bin/sh$|#!/usr/bin/env bash|' '{}' +; \ - \ -# fix permissions (especially for running as non-root) -# https://github.com/docker-library/tomcat/issues/35 - chmod -R +rX .; \ - chmod 777 logs temp work; \ - \ -# smoke test - catalina.sh version - -# verify Tomcat Native is working properly -RUN set -eux; \ - nativeLines="$(catalina.sh configtest 2>&1)"; \ - nativeLines="$(echo "$nativeLines" | grep 'Apache Tomcat Native')"; \ - nativeLines="$(echo "$nativeLines" | sort -u)"; \ - if ! echo "$nativeLines" | grep -E 'INFO: Loaded( APR based)? Apache Tomcat Native library' >&2; then \ - echo >&2 "$nativeLines"; \ - exit 1; \ - fi - -EXPOSE 8080 -CMD ["catalina.sh", "run"] diff --git a/versions.json b/versions.json index 662094030..938374f6e 100644 --- a/versions.json +++ b/versions.json @@ -2,10 +2,6 @@ "10.0": { "sha512": "53bfdbac2e6af5cca97dc01fffb0428380fbe21d8375f45d015c16a57017ff946fdc555ebad9e9fcbcb97b438c4f6daf3aa39d36ca79fd5a372cfc1a80b7117f", "variants": [ - "jdk17/openjdk-bullseye", - "jdk17/openjdk-buster", - "jdk17/openjdk-slim-bullseye", - "jdk17/openjdk-slim-buster", "jdk17/corretto", "jdk17/temurin-focal", "jre17/temurin-focal",