Add current node LTS version to the images list
[mbt-docker.git] / Dockerfile
index cc013d88fb3700a039a895c9e2d8b209b4460fac..fd929773639f9342c5418917ab6dc3d1ee7f6cf3 100644 (file)
@@ -21,7 +21,7 @@ RUN set -ex \
 ADD http://aia.pki.co.sap.com/aia/SAP%20Global%20Root%20CA.crt \
     /etc/ssl/certs/SAP_Global_Root_CA.crt
 
-ARG NODE_VERSION=16.17.1
+ARG NODE_VERSION=16.18.0
 
 RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
     && case "${dpkgArch##*-}" in \
@@ -113,12 +113,17 @@ RUN set -ex \
 
 ARG SAPMACHINE_VERSION=11.0.16.1
 
-RUN set -ex \
+RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
+    && case "${dpkgArch##*-}" in \
+      amd64) ARCH='amd64';; \
+      *) echo "unsupported architecture"; exit 1 ;; \
+    esac \
+  && set -ex \
   && apt-get update \
   && apt-get install -y ca-certificates wget --no-install-recommends \
   && rm -rf /var/lib/apt/lists/* \
   && wget -q -O - https://dist.sapmachine.io/debian/sapmachine.key | tee /etc/apt/trusted.gpg.d/sapmachine.gpg.asc \
-  && echo "deb http://dist.sapmachine.io/debian/amd64/ ./" | tee /etc/apt/sources.list.d/sapmachine.list \
+  && echo "deb http://dist.sapmachine.io/debian/${ARCH}/ ./" | 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/* \
@@ -151,7 +156,8 @@ RUN set -ex \
 ARG MBT_VERSION=1.2.18
 
 RUN set -ex \
-  && npm install -g mbt@${MBT_VERSION} \
+  && npm install -g --unsafe-perm mbt@${MBT_VERSION} \
+  && npm cache clean -g --force \
   # smoke test
   && mbt --version