Skip to content
Snippets Groups Projects
Commit 9086a1f0 authored by Brice Copy's avatar Brice Copy
Browse files

Preparing maven 3.6.2 / jdk 11

parents b2594a0c 757e6f3b
No related branches found
No related tags found
No related merge requests found
Pipeline #1117302 canceled
......@@ -2,36 +2,40 @@ ARG FROM_IMAGE=maven:3.5.3-jdk-8
FROM ${FROM_IMAGE}
ARG DOCKER_VERSION=5:19.03.0~3-0~debian-stretch
ARG DEBIAN_DOCKER_VERSION=stretch
ARG DOCKER_VERSION=5:19.03.0~3-0~debian-${DEBIAN_DOCKER_VERSION}
ARG DOCKER_ARCH=amd64
ENV CACERTS ${JAVA_HOME}/jre/lib/security/cacerts
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
# The Debian release can be obtained with lsb_release -cs
# You can substitute $DEBIAN_DOCKER_VERSION by $(lsb_release -cs)
# but Docker is not always available for latest Debians
RUN apt-get update && \
apt autoremove && \
apt-get upgrade -y && \
apt-get install -y apt-transport-https ca-certificates \
curl gnupg2 software-properties-common && \
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
RUN add-apt-repository \
"deb [arch=${DOCKER_ARCH}] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
RUN apt-get update && echo "List of available Docker versions ( we are using ${DOCKER_VERSION} )" && apt-cache madison docker-ce
RUN apt-get install -y docker-ce-cli=${DOCKER_VERSION}
RUN curl -o /tmp/cern-root-ca-2.crt "https://cafiles.cern.ch/cafiles/certificates/CERN%20Root%20Certification%20Authority%202.crt" && \
curl -o /tmp/cern-ca.crt "https://cafiles.cern.ch/cafiles/certificates/CERN%20Certification%20Authority.crt" && \
curl -o /tmp/cern-ca-1.crt "https://cafiles.cern.ch/cafiles/certificates/CERN%20Certification%20Authority(1).crt" && \
keytool -noprompt -import -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -alias CERN_ROOT_CA_2 -file "/tmp/cern-root-ca-2.crt" && \
keytool -noprompt -import -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -alias CERN_CA -file "/tmp/cern-ca.crt" && \
keytool -noprompt -import -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -alias CERN_CA_1 -file "/tmp/cern-ca-1.crt" && \
rm /tmp/*.crt
add-apt-repository \
"deb [arch=${DOCKER_ARCH}] https://download.docker.com/linux/debian \
${DEBIAN_DOCKER_VERSION} stable" && \
apt-get update && echo "List of available Docker versions ( we are using ${DOCKER_VERSION} )" && apt-cache madison docker-ce-cli && \
apt-get install -y docker-ce-cli=${DOCKER_VERSION} && \
apt clean -y && rm -rf /var/lib/apt/lists/
RUN wget -O /tmp/cern-root-ca-2.crt "https://cafiles.cern.ch/cafiles/certificates/CERN%20Root%20Certification%20Authority%202.crt" && \
wget -O /tmp/cern-ca.crt "https://cafiles.cern.ch/cafiles/certificates/CERN%20Certification%20Authority.crt" && \
wget -O /tmp/cern-ca-1.crt "https://cafiles.cern.ch/cafiles/certificates/CERN%20Certification%20Authority(1).crt" && \
keytool -noprompt -import -cacerts -storepass changeit -alias CERN_ROOT_CA_2 -file "/tmp/cern-root-ca-2.crt" && \
keytool -noprompt -import -cacerts -storepass changeit -alias CERN_CA -file "/tmp/cern-ca.crt" && \
keytool -noprompt -import -cacerts -storepass changeit -alias CERN_CA_1 -file "/tmp/cern-ca-1.crt" && \
rm /tmp/*.crt && \
mkdir -p ~/.ssh && \
echo -e "Host gitlab.cern.ch\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
RUN mkdir -p /opt
ADD src/main/java/SSLPoke.java /opt
RUN cd /opt && javac SSLPoke.java && java SSLPoke repository.cern.ch 443
RUN rm -rf /var/lib/apt/lists/
......@@ -4,7 +4,7 @@
<groupId>cern.ics.swinfra</groupId>
<artifactId>mvn-dind</artifactId>
<version>3.5.3-19.0.3-jdk8-SNAPSHOT</version>
<version>3.6.2-19.3.0-jdk11-SNAPSHOT</version>
<description>A Maven + Docker DIND image to build images.</description>
......@@ -54,7 +54,8 @@
<repository>gitlab-registry.cern.ch/industrial-controls/sw-infra/mvn-dind</repository>
<tag>${project.version}</tag>
<buildArgs>
<FROM_IMAGE>maven:3.5.3-jdk-8</FROM_IMAGE>
<FROM_IMAGE>maven:3.6.2-jdk-11</FROM_IMAGE>
<DEBIAN_DOCKER_VERSION>stretch</DEBIAN_DOCKER_VERSION>
<DOCKER_VERSION>5:19.03.0~3-0~debian-stretch</DOCKER_VERSION>
<DOCKER_ARCH>amd64</DOCKER_ARCH>
</buildArgs>
......@@ -62,4 +63,4 @@
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
</project>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment