Skip to content

Commit 09a3fb6

Browse files
committed
Update content zip handling
1 parent 6a7f85a commit 09a3fb6

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,21 @@ ARG ERDDAP_VERSION=2.25.1
4343
ARG ERDDAP_CONTENT_VERSION=1.0.0
4444
ARG ERDDAP_WAR_URL="https://github.com/ERDDAP/erddap/releases/download/v${ERDDAP_VERSION}/erddap.war"
4545
ARG ERDDAP_CONTENT_URL="https://github.com/ERDDAP/erddapContent/archive/refs/tags/content${ERDDAP_CONTENT_VERSION}.zip"
46-
ENV ERDDAP_bigParentDirectory /erddapData
46+
ENV ERDDAP_bigParentDirectory=/erddapData
4747

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

5252
ARG BUST_CACHE=1
5353
RUN \
54-
curl -fSL "${ERDDAP_CONTENT_URL}" -o /erddapContent.zip && \
55-
unzip /erddapContent.zip -d ${CATALINA_HOME} && \
56-
rm /erddapContent.zip && \
57-
curl -fSL "${ERDDAP_WAR_URL}" -o /erddap.war && \
58-
unzip /erddap.war -d ${CATALINA_HOME}/webapps/erddap/ && \
59-
rm /erddap.war && \
54+
mkdir -p /tmp/dl && \
55+
curl -fSL "${ERDDAP_WAR_URL}" -o /tmp/dl/erddap.war && \
56+
unzip /tmp/dl/erddap.war -d ${CATALINA_HOME}/webapps/erddap/ && \
57+
curl -fSL "${ERDDAP_CONTENT_URL}" -o /tmp/dl/erddapContent.zip && \
58+
unzip /tmp/dl/erddapContent.zip -d /tmp/dl/erddapContent && \
59+
find /tmp/dl/erddapContent -type d -name content -exec cp -r "{}" ${CATALINA_HOME} \; && \
60+
rm -rf /tmp/dl && \
6061
sed -i 's#</Context>#<Resources cachingAllowed="true" cacheMaxSize="100000" />\n&#' ${CATALINA_HOME}/conf/context.xml && \
6162
rm -rf /tmp/* /var/tmp/* && \
6263
mkdir -p ${ERDDAP_bigParentDirectory}

0 commit comments

Comments
 (0)