Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG BASE_IMAGE=tomcat:10.1.26-jdk21-temurin-jammy
#referencing a specific image digest pins our unidata tomcat-docker image to platform amd64 (good)
ARG UNIDATA_TOMCAT_IMAGE=unidata/tomcat-docker:10-jdk17@sha256:af7d3fecec753cbd438f25881deeaf48b40ac1f105971d6f300252e104e39fb2
FROM ${UNIDATA_TOMCAT_IMAGE} as unidata-tomcat-image
FROM ${UNIDATA_TOMCAT_IMAGE} AS unidata-tomcat-image

Check warning on line 4 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build and test Docker Image (linux/arm64/v8, jdk21-openjdk, tomcat:10.1.26-jdk21-temurin-jammy@sh...

Base image platform does not match expected target platform

InvalidBaseImagePlatform: Base image unidata/tomcat-docker:10-jdk17@sha256:af7d3fecec753cbd438f25881deeaf48b40ac1f105971d6f300252e104e39fb2 was pulled with platform "linux/amd64", expected "linux/arm64" for current build
FROM ${BASE_IMAGE}

#use approaches and hardened files from https://github.com/Unidata/tomcat-docker
Expand Down Expand Up @@ -39,23 +39,25 @@
# Security enhanced server.xml
COPY --from=unidata-tomcat-image ${CATALINA_HOME}/conf/server.xml ${CATALINA_HOME}/conf/

ARG ERDDAP_VERSION=2.24
ARG ERDDAP_CONTENT_URL=https://github.com/ERDDAP/erddap/releases/download/v$ERDDAP_VERSION/erddapContent.zip
ARG ERDDAP_WAR_URL=https://github.com/ERDDAP/erddap/releases/download/v$ERDDAP_VERSION/erddap.war
ENV ERDDAP_bigParentDirectory /erddapData
ARG ERDDAP_VERSION=2.25.1
ARG ERDDAP_CONTENT_VERSION=1.0.0
ARG ERDDAP_WAR_URL="https://github.com/ERDDAP/erddap/releases/download/v${ERDDAP_VERSION}/erddap.war"
ARG ERDDAP_CONTENT_URL="https://github.com/ERDDAP/erddapContent/archive/refs/tags/content${ERDDAP_CONTENT_VERSION}.zip"
ENV ERDDAP_bigParentDirectory=/erddapData

RUN apt-get update && apt-get install -y unzip xmlstarlet \
&& if ! command -v gosu &> /dev/null; then apt-get install -y gosu; fi \
&& rm -rf /var/lib/apt/lists/*

ARG BUST_CACHE=1
RUN \
curl -fSL "${ERDDAP_CONTENT_URL}" -o /erddapContent.zip && \
unzip /erddapContent.zip -d ${CATALINA_HOME} && \
rm /erddapContent.zip && \
curl -fSL "${ERDDAP_WAR_URL}" -o /erddap.war && \
unzip /erddap.war -d ${CATALINA_HOME}/webapps/erddap/ && \
rm /erddap.war && \
mkdir -p /tmp/dl && \
curl -fSL "${ERDDAP_WAR_URL}" -o /tmp/dl/erddap.war && \
unzip /tmp/dl/erddap.war -d ${CATALINA_HOME}/webapps/erddap/ && \
curl -fSL "${ERDDAP_CONTENT_URL}" -o /tmp/dl/erddapContent.zip && \
unzip /tmp/dl/erddapContent.zip -d /tmp/dl/erddapContent && \
find /tmp/dl/erddapContent -type d -name content -exec cp -r "{}" ${CATALINA_HOME} \; && \
rm -rf /tmp/dl && \
sed -i 's#</Context>#<Resources cachingAllowed="true" cacheMaxSize="100000" />\n&#' ${CATALINA_HOME}/conf/context.xml && \
rm -rf /tmp/* /var/tmp/* && \
mkdir -p ${ERDDAP_bigParentDirectory}
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ A feature full Tomcat (SSL over APR, etc.) running [ERDDAP](http://coastwatch.pf

Most recent versions:

* `axiom/docker-erddap:latest-jdk21-openjdk` (2.24)
* `axiom/docker-erddap:latest-jdk21-openjdk` (2.25.1)
* `axiom/docker-erddap:2.25.1-jdk21-openjdk`
* `axiom/docker-erddap:2.24-jdk21-openjdk`
* `axiom/docker-erddap:2.23-jdk17-openjdk`

Expand Down