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

Update keytool commands and docker distribution flag to Debian Sid and Java 11

parent ac42f7e6
No related branches found
No related tags found
No related merge requests found
Pipeline #1115167 failed
......@@ -2,31 +2,37 @@ 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 apt-get update && \
RUN apt -y autoremove && \
apt-get update && \
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 -
# The Debian release can be obtained with lsb_release -cs
# You can substitute $DEBIAN_VERSION by $(lsb_release -cs)
# but Docker is not always available for latest Debians
RUN add-apt-repository \
"deb [arch=${DOCKER_ARCH}] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
${DEBIAN_DOCKER_VERSION} \
stable"
RUN apt-get update && echo "List of available Docker versions ( we are using ${DOCKER_VERSION} )" && apt-cache madison docker-ce
RUN apt-get update && echo "List of available Docker versions ( we are using ${DOCKER_VERSION} )" && apt-cache madison docker-ce-cli
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" && \
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
RUN mkdir -p /opt
......
......@@ -55,6 +55,7 @@
<tag>${project.version}</tag>
<buildArgs>
<FROM_IMAGE>maven:3.5.3-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