Skip to content
Open
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
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ RUN apt-get update && \
git \
wget \
unzip \
openjdk-11-jdk \
openjdk-17-jdk \
python3-pip \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense! Did not know this was still on 11.

dos2unix \
vim \
&& rm -rf /var/lib/apt/lists/*

ARG MAVEN_VERSION=3.9.12
# Install Maven
RUN wget https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.zip -O /tmp/maven.zip && \
ARG MAVEN_VERSION=3.9.16
# Install Maven (try CDN first, fall back to archive for resilience)
RUN (wget https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.zip -O /tmp/maven.zip || \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the CDN fails do we have a partial file left to get in the way of the next option?

Okay -O takes care of it... "overwrite"...

wget https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.zip -O /tmp/maven.zip) && \
unzip /tmp/maven.zip -d /opt && \
ln -s /opt/apache-maven-${MAVEN_VERSION} /opt/maven && \
ln -s /opt/maven/bin/mvn /usr/bin/mvn && \
Expand Down Expand Up @@ -47,7 +48,7 @@ RUN wget https://sourceforge.net/projects/xframe/files/xsddoc/xsddoc-1.0/xsddoc-
RUN curl "https://repo1.maven.org/maven2/xerces/xercesImpl/2.12.2/xercesImpl-2.12.2.jar" -o /opt/xsddoc-1.0/lib/xercesImpl.jar

# Set Java environment variables
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
ENV PATH=$JAVA_HOME/bin:/opt/xsddoc-1.0/bin:$PATH

# Clone the GeoWebCache repositories
Expand Down
3 changes: 3 additions & 0 deletions setup_git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ if [ -n "$GIT_EMAIL" ]; then
git config --global user.email "$GIT_EMAIL"
fi

# Cache credentials in memory for 1 min to avoid repeated prompts
git config --global credential.helper 'cache --timeout=60'

exec /bin/bash