Fix mbt installation with previous LTS node version
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 19 Oct 2022 12:09:23 +0000 (14:09 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 19 Oct 2022 12:09:23 +0000 (14:09 +0200)
Also cleanup npm cache to minimize the image size

Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
.xmake.cfg
Dockerfile
Makefile

index 33d6cd1e8bdc1151d96370af40e0a2c47008e839..412b278de2b0bb7bd8f4e4c8f94c9a422e22ccb2 100644 (file)
@@ -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]
index e772ceaa5d9d6e0346b97f8b0cefe7d12d151f54..fd929773639f9342c5418917ab6dc3d1ee7f6cf3 100644 (file)
@@ -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
 
index b972ac2eedfdf327926ad8afcb727caa80af2a48..3d0ffc86c4e154a620c2a40babb8847de5f30a83 100644 (file)
--- 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)