Skip to content

Commit

Permalink
pin tcnative to 1.2 (2.x requires openssl 3.)
Browse files Browse the repository at this point in the history
  • Loading branch information
alxgomz committed Jun 26, 2023
1 parent 49a2e32 commit e95a50d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
14 changes: 9 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ ENV APACHE_MIRRORS \
ARG TOMCAT_MAJOR
ARG TOMCAT_VERSION
ARG TOMCAT_SHA512
ARG TCNATIVE_VERSION
ARG TCNATIVE_SHA512

FROM base AS tomcat
ARG APACHE_MIRRORS
RUN \
set -eu; \
mkdir -p /build/tomcat; \
mkdir -p /build/{tcnative,tomcat}; \
active_mirror=; \
for mirror in $APACHE_MIRRORS; do \
if curl -fsSL ${mirror}/tomcat/tomcat-${TOMCAT_MAJOR}/KEYS | gpg --import; then \
Expand All @@ -33,22 +35,24 @@ RUN \
echo "Using mirror ${active_mirror}"; \
for filetype in '.tar.gz' '.tar.gz.asc'; do \
curl -fsSLo tomcat${filetype} ${active_mirror}/tomcat/tomcat-${TOMCAT_MAJOR}/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}${filetype}; \
curl -fsSLo tcnative${filetype} ${active_mirror}/tomcat/tomcat-connectors/native/${TCNATIVE_VERSION}/source/tomcat-native-${TCNATIVE_VERSION}-src.tar.gz; \
done; \
\
echo "$TOMCAT_SHA512 *tomcat.tar.gz" | sha512sum -c - || (echo "Checksum did't match: $(sha512sum *tomcat.tar.gz)" && exit 1); \
echo "$TCNATIVE_SHA512 *tcnative.tar.gz" | sha512sum -c - || (echo "Checksum did't match: $(sha512sum *tcnative.tar.gz)" && exit 1); \
\
gpg --batch --verify tomcat.tar.gz.asc tomcat.tar.gz && \
tar -zxf tomcat.tar.gz -C /build/tomcat --strip-components=1
#gpg --batch --verify tcnative.tar.gz.asc tcnative.tar.gz && \
#gpg --batch --verify tomcat.tar.gz.asc tomcat.tar.gz && \
tar -zxf tomcat.tar.gz -C /build/tomcat --strip-components=1 && \
tar -zxf tcnative.tar.gz -C /build/tcnative --strip-components=1

FROM tomcat AS TCNATIVE_BUILD
ARG JAVA_MAJOR
ENV JAVA_HOME /usr/lib/jvm/java-openjdk
ARG BUILD_DIR=/build
ARG INSTALL_DIR=/usr/local
RUN set -eu; \
mkdir -p {${INSTALL_DIR},${BUILD_DIR}}/tcnative; \
cd $BUILD_DIR; \
tar -zxf tomcat/bin/tomcat-native.tar.gz --strip-components=1 -C tcnative; \
yum install -y gcc make openssl-devel expat-devel java-${JAVA_MAJOR}-openjdk-devel apr-devel redhat-rpm-config; \
cd tcnative/native; \
./configure \
Expand Down
4 changes: 3 additions & 1 deletion tomcat10.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"tomcat_sha512": "be35edeb7f63be2d087da6b5cf3c1250eb5fbaa484ba788870780109278d1f5607bf8dfb40f718beda82352109c131fc97f7907f5521dc462bd60773b33e2c68",
"tomcat_version": "10.1.10"
"tomcat_version": "10.1.10",
"tcnative_sha512": "e845239f1b6a1dab22885d39f4fd131e464c38b0d52faca0d960f99fe3e8b7d732c0112f25e5eb81ff8dc71a5e3c6799bfdf867e617d8f934068ed107036fd0b",
"tcnative_version": "1.2.37"
}
2 changes: 2 additions & 0 deletions tomcat9.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"tomcat_sha512": "028163cbe15367f0ab60e086b0ebc8d774e62d126d82ae9152f863d4680e280b11c9503e3b51ee7089ca9bea1bfa5b535b244a727a3021e5fa72dd7e9569af9a",
"tomcat_version": "9.0.76"
"tcnative_sha512": "e845239f1b6a1dab22885d39f4fd131e464c38b0d52faca0d960f99fe3e8b7d732c0112f25e5eb81ff8dc71a5e3c6799bfdf867e617d8f934068ed107036fd0b",
"tcnative_version": "1.2.37"
}

0 comments on commit e95a50d

Please sign in to comment.