we must only install nodejs, check if npm was contained and install it, if not

otherwise apt shows a conflict but returns success :(
This commit is contained in:
ralf 2023-11-22 16:25:28 +02:00
parent 7af6c40d17
commit 590878c4e7
2 changed files with 6 additions and 2 deletions

View File

@ -54,7 +54,9 @@ RUN apt-get update \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
# install tools to build EGroupware
&& apt-get install -y rsync nodejs npm zip curl sudo cron patch \
&& apt-get install -y rsync nodejs zip curl sudo cron patch \
# nodejs PPA does NOT exist for ppc64le, therefore we need to install npm separate, as not included in stock nodejs on Ubuntu
&& test -f /usr/bin/npm || apt-get install -y npm \
&& npm install -g grunt-cli \
&& bash -c \
'EXPECTED_SIGNATURE=$(curl https://composer.github.io/installer.sig); \

View File

@ -85,7 +85,9 @@ RUN set -e \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install -y nodejs npm \
&& apt-get install -y nodejs \
# nodejs PPA does NOT exist for ppc64le, therefore we need to install npm separate, as not included in stock nodejs on Ubuntu
&& test -f /usr/bin/npm || apt-get install -y npm \
&& npm install -g grunt-cli \
&& npm install \
&& grunt \