From: Jérôme Benoit Date: Wed, 19 Oct 2022 12:09:23 +0000 (+0200) Subject: Fix mbt installation with previous LTS node version X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;ds=sidebyside;h=34672c4ca776088933ad7de97f0b9bffc483c144;p=mbt-docker.git Fix mbt installation with previous LTS node version Also cleanup npm cache to minimize the image size Signed-off-by: Jérôme Benoit --- diff --git a/.xmake.cfg b/.xmake.cfg index 33d6cd1..412b278 100644 --- a/.xmake.cfg +++ b/.xmake.cfg @@ -1,5 +1,5 @@ [xmake] -version=1.0.2 +version=1.0.3 # https://github.wdf.sap.corp/pages/xmake-ci/User-Guide/Setting_up_a_Build/Release_Procedure/Release_Versions/ [buildplugin] diff --git a/Dockerfile b/Dockerfile index e772cea..fd92977 100644 --- a/Dockerfile +++ b/Dockerfile @@ -156,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 diff --git a/Makefile b/Makefile index b972ac2..3d0ffc8 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ PROJECT_NAME?=sap-e-mobility -NAME:=mbt-docker +NAME?=mbt-docker SUBMODULES_INIT?=false DOCKER_REGISTRY_USERNAME?=fraggle0 DOCKER_REGISTRY_PASSWORD?= @@ -19,10 +19,10 @@ ifeq '$(SUBMODULES_INIT)' 'true' endif $(NAME): $(submodules-init) - docker-compose -p $(PROJECT_NAME) up -d + docker-compose -p $(PROJECT_NAME) up -d $(NAME) $(NAME)-force: $(submodules-init) - docker-compose -p $(PROJECT_NAME) up -d --build --force-recreate + docker-compose -p $(PROJECT_NAME) up -d --build --force-recreate $(NAME) all: $(NAME)