From 56acd2ef3123b66cba47d9a3d770f01af1c4d76a Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 12 Apr 2023 17:14:54 +0200 Subject: [PATCH] nodejs PPA does NOT exist for ppc64le, falling back to the version included in Ubuntu and the separate npm package --- doc/docker/fpm/Dockerfile | 7 +++++-- doc/docker/fpm/build.sh | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/docker/fpm/Dockerfile b/doc/docker/fpm/Dockerfile index 0e0f98f3f0..db1583a507 100644 --- a/doc/docker/fpm/Dockerfile +++ b/doc/docker/fpm/Dockerfile @@ -1,6 +1,6 @@ ################################################################################ ## -## EGroupware FPM container using Ubuntu 18.04 and PHP 7.3 from ondrej/php PPA +## EGroupware FPM container using Ubuntu 20.04 and PHP 8.1 from ondrej/php PPA ## ################################################################################ ARG ARCH= @@ -14,7 +14,8 @@ ARG PHP_VERSION=8.1 ENV VERSION=$VERSION ENV PHP_VERSION=$PHP_VERSION -RUN apt-get update \ +RUN set -e \ + && apt-get update \ && apt-get install -y software-properties-common \ && LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php \ && apt-get update \ @@ -81,6 +82,8 @@ exit $RESULT' \ # install nodejs 16.x PPA (Shoelace requires >= 14.17, Ubuntu 22.04 only has 12.x) && curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \ && 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 \ diff --git a/doc/docker/fpm/build.sh b/doc/docker/fpm/build.sh index ef8f5cb091..07c6ddb79b 100755 --- a/doc/docker/fpm/build.sh +++ b/doc/docker/fpm/build.sh @@ -37,7 +37,7 @@ docker pull ubuntu:20.04 # add further tags for default PHP version only [ $PHP_VERSION = $DEFAULT_PHP_VERSION -a "$BRANCH" != $VERSION -a "dev-${BRANCH}" != $VERSION ] && { - extra_tags="$tags --tag egroupware/egroupware:latest --tag egroupware/egroupware:$BRANCH" + extra_tags="--tag egroupware/egroupware:latest --tag egroupware/egroupware:$BRANCH" } if docker buildx 2>&1 >/dev/null @@ -48,7 +48,7 @@ else # no buildx, eg. on dev only builds amd64! docker build --build-arg "VERSION=$VERSION" --build-arg "PHP_VERSION=$PHP_VERSION" --tag egroupware/egroupware:$TAG . && { docker push egroupware/egroupware:$TAG - for tag in $tags + for tag in $extra_tags do [ -z "$tag" -o "$tag" = "--tags" ] || { docker tag egroupware/egroupware:$TAG $tag