From: Jérôme Benoit Date: Thu, 29 Sep 2022 11:33:54 +0000 (+0200) Subject: Switch to SAP Machine JDK + enfore strict version X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=8c37d866ed2eb9919901f5db84c49e4afe74d38d;p=mbt-docker.git Switch to SAP Machine JDK + enfore strict version Signed-off-by: Jérôme Benoit --- diff --git a/Dockerfile b/Dockerfile index 3900fcf..a31c683 100644 --- a/Dockerfile +++ b/Dockerfile @@ -81,7 +81,8 @@ ARG YARN_VERSION=1.22.19 RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ - && apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr --no-install-recommends \ + && apt-get update \ + && apt-get install -y ca-certificates curl wget gnupg dirmngr --no-install-recommends \ && rm -rf /var/lib/apt/lists/* \ && for key in \ 6A010C5166006599AA17F08146C2130DFD2497F5 \ @@ -110,6 +111,27 @@ RUN set -ex \ # smoke test && yarn --version +ARG SAPMACHINE_VERSION=11.0.16.1 + +RUN set -ex \ + && apt-get update \ + && apt-get install -y gnupg dirmngr --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* \ + && for key in \ + CACB9FE09150307D1D22D82962754C3B3ABCFE23 \ + ; do \ + gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" || \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \ + gpg --batch --export --armor "$key" | tee /etc/apt/trusted.gpg.d/sapmachine-${key}.gpg.asc; \ + done \ + && echo "deb http://dist.sapmachine.io/debian/amd64/ ./" | tee /etc/apt/sources.list.d/sapmachine.list \ + && apt-get update \ + && apt-get install -y sapmachine-$(echo ${SAPMACHINE_VERSION} | cut -d. -f1)-jdk=${SAPMACHINE_VERSION} --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* \ + && apt-get remove --purge --autoremove -y gnupg dirmngr \ + # smoke test + && java --version + ARG MAVEN_VERSION=3.8.6 ARG SHA=f790857f3b1f90ae8d16281f902c689e4f136ebe584aba45e4b1fa66c80cba826d3e0e52fdd04ed44b4c66f6d3fe3584a057c26dfcac544a60b301e6d0f91c26 ARG BASE_URL=https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries @@ -119,7 +141,7 @@ ENV M2_HOME ${MAVEN_HOME} RUN set -ex \ && apt-get update \ - && apt-get install -y ca-certificates curl openjdk-11-jdk procps --no-install-recommends \ + && apt-get install -y ca-certificates curl procps --no-install-recommends \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p ${MAVEN_HOME} ${MAVEN_HOME}/ref \ && curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \ @@ -129,18 +151,23 @@ RUN set -ex \ && ln -s ${MAVEN_HOME}/bin/mvn /usr/bin/mvn \ && chmod --recursive a+w "${MAVEN_HOME}"/conf/* \ && apt-get remove --purge --autoremove -y curl \ - # smoke tests - && java --version \ + # smoke test && mvn --version -# Install SAP e-Mobility requirements +ARG MBT_VERSION=1.2.18 + +RUN set -ex \ + && npm install -g mbt@${MBT_VERSION} \ + # smoke test + && mbt --version + +# SAP e-Mobility requirements RUN set -ex \ && apt-get update \ && apt-get install -y build-essential python3 --no-install-recommends \ && rm -rf /var/lib/apt/lists/* \ - && npm install -g mbt \ # smoke test - && mbt --version + && python3 --version WORKDIR /project USER ${USER}