diff --git a/doc/docker/development/Dockerfile b/doc/docker/development/Dockerfile index 6a896bd27d..0ed6b7031a 100644 --- a/doc/docker/development/Dockerfile +++ b/doc/docker/development/Dockerfile @@ -7,7 +7,7 @@ FROM ubuntu:22.04 MAINTAINER rb@egroupware.org ARG VERSION=dev-master -ARG PHP_VERSION=7.4 +ARG PHP_VERSION=8.1 # keeping build-arg in environment for entrypoint.sh ENV VERSION=$VERSION diff --git a/doc/docker/development/build.sh b/doc/docker/development/build.sh index 99767a3f89..a061175b23 100755 --- a/doc/docker/development/build.sh +++ b/doc/docker/development/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/bin/bash -xe REPO=egroupware IMAGE=development @@ -7,7 +7,7 @@ RECOMMENDED_PHP_VERSION=8.1 PHP_VERSION=${1:-8.1} -TAG=$(docker run --rm -i --entrypoint bash $REPO/$IMAGE:$PHP_VERSION -c "apt update && apt search php$PHP_VERSION-fpm" 2>/dev/null|grep php$PHP_VERSION-fpm|sed "s|^php$PHP_VERSION-fpm/[^ ]* \([78]\.[0-9]*\.[0-9]*\).*|\1|g") +TAG=$(docker run --rm -i --entrypoint bash $REPO/$IMAGE:latest -c "apt update && apt search php$PHP_VERSION-fpm" 2>/dev/null|grep php$PHP_VERSION-fpm|sed "s|^php$PHP_VERSION-fpm/[^ ]* .*\([78]\.[0-9]*\.[0-9]*\).*|\1|g") test -z "$TAG" && { echo "Can't get new tag of $REPO/$IMAGE container --> existing" exit 1 @@ -26,7 +26,7 @@ echo -e "\nbuilding $REPO/$IMAGE:$TAG\n" cd $(dirname $0) docker pull $BASE -docker build --build-arg "VERSION=$VERSION" --build-arg="PHP_VERSION=$PHP_VERSION" -t $REPO/$IMAGE:$TAG . && { +docker build --no-cache --build-arg "VERSION=$VERSION" --build-arg="PHP_VERSION=$PHP_VERSION" -t $REPO/$IMAGE:$TAG . && { docker push $REPO/$IMAGE:$TAG # tag master by major PHP version eg. 8.1