Remove use of RUN here doc syntax as feature is not supported by version of docker used on build server

pull/24/head
Jody Garnett 2023-06-07 21:00:57 -07:00
parent a1cec7cc07
commit e739b288d6
1 changed files with 23 additions and 38 deletions

View File

@ -27,35 +27,26 @@ ENV CATALINA_OPTS="\$EXTRA_JAVA_OPTS \
-Dorg.geotools.coverage.jaiext.enabled=true" -Dorg.geotools.coverage.jaiext.enabled=true"
# init # init
RUN <<EOF RUN apt update \
set -e && apt -y upgrade \
apt update && apt install -y --no-install-recommends openssl unzip gdal-bin wget curl openjdk-11-jdk \
apt -y upgrade && apt clean \
apt install -y --no-install-recommends openssl unzip gdal-bin wget curl openjdk-11-jdk && rm -rf /var/cache/apt/* \
apt clean && rm -rf /var/lib/apt/lists/*
rm -rf /var/cache/apt/*
rm -rf /var/lib/apt/lists/*
EOF
WORKDIR /opt/ WORKDIR /opt/
RUN <<EOF RUN wget -q https://archive.apache.org/dist/tomcat/tomcat-9/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz \
set -e && tar xf apache-tomcat-${TOMCAT_VERSION}.tar.gz \
wget -q https://archive.apache.org/dist/tomcat/tomcat-9/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz && rm apache-tomcat-${TOMCAT_VERSION}.tar.gz \
tar xf apache-tomcat-${TOMCAT_VERSION}.tar.gz && rm -rf /opt/apache-tomcat-${TOMCAT_VERSION}/webapps/ROOT \
rm apache-tomcat-${TOMCAT_VERSION}.tar.gz && rm -rf /opt/apache-tomcat-${TOMCAT_VERSION}/webapps/docs \
rm -rf /opt/apache-tomcat-${TOMCAT_VERSION}/webapps/ROOT && rm -rf /opt/apache-tomcat-${TOMCAT_VERSION}/webapps/examples
rm -rf /opt/apache-tomcat-${TOMCAT_VERSION}/webapps/docs
rm -rf /opt/apache-tomcat-${TOMCAT_VERSION}/webapps/examples
EOF
# cleanup # cleanup
RUN <<EOF RUN apt purge -y \
set -e && apt autoremove --purge -y \
apt purge -y && \ && rm -rf /tmp/*
apt autoremove --purge -y && \
rm -rf /tmp/*
EOF
FROM tomcat as download FROM tomcat as download
@ -67,14 +58,11 @@ ENV GEOSERVER_BUILD=$GS_BUILD
WORKDIR /tmp WORKDIR /tmp
RUN <<EOF RUN echo "Downloading GeoServer ${GS_VERSION} ${GS_BUILD}" \
set -e && wget -q -O /tmp/geoserver.zip $WAR_ZIP_URL \
echo "Downloading GeoServer ${GS_VERSION} ${GS_BUILD}" && unzip geoserver.zip geoserver.war -d /tmp/ \
wget -q -O /tmp/geoserver.zip $WAR_ZIP_URL && unzip -q /tmp/geoserver.war -d /tmp/geoserver \
unzip geoserver.zip geoserver.war -d /tmp/ && rm /tmp/geoserver.war
unzip -q /tmp/geoserver.war -d /tmp/geoserver
rm /tmp/geoserver.war
EOF
FROM tomcat as install FROM tomcat as install
@ -106,14 +94,11 @@ ENV ROOT_WEBAPP_REDIRECT=false
WORKDIR /tmp WORKDIR /tmp
RUN echo "Installing GeoServer $GS_VERSION $GS_BUILD" RUN echo "Installing GeoServer $GS_VERSION $GS_BUILD"
# install geoserver
COPY --from=download /tmp/geoserver $CATALINA_HOME/webapps/geoserver COPY --from=download /tmp/geoserver $CATALINA_HOME/webapps/geoserver
RUN <<EOF RUN mv $CATALINA_HOME/webapps/geoserver/WEB-INF/lib/marlin-*.jar $CATALINA_HOME/lib/marlin.jar \
set -e && mkdir -p $GEOSERVER_DATA_DIR
mv $CATALINA_HOME/webapps/geoserver/WEB-INF/lib/marlin-*.jar $CATALINA_HOME/lib/marlin.jar
mkdir -p $GEOSERVER_DATA_DIR
EOF
COPY $GS_DATA_PATH $GEOSERVER_DATA_DIR COPY $GS_DATA_PATH $GEOSERVER_DATA_DIR
COPY $ADDITIONAL_LIBS_PATH $GEOSERVER_LIB_DIR COPY $ADDITIONAL_LIBS_PATH $GEOSERVER_LIB_DIR