fix build for current 8.1 and new 8.2 builds

This commit is contained in:
ralf 2023-01-16 16:17:11 -06:00
parent 4a3fcec432
commit 8540977872
2 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ FROM ubuntu:22.04
MAINTAINER rb@egroupware.org MAINTAINER rb@egroupware.org
ARG VERSION=dev-master ARG VERSION=dev-master
ARG PHP_VERSION=7.4 ARG PHP_VERSION=8.1
# keeping build-arg in environment for entrypoint.sh # keeping build-arg in environment for entrypoint.sh
ENV VERSION=$VERSION ENV VERSION=$VERSION

View File

@ -1,4 +1,4 @@
#!/bin/bash -x #!/bin/bash -xe
REPO=egroupware REPO=egroupware
IMAGE=development IMAGE=development
@ -7,7 +7,7 @@ RECOMMENDED_PHP_VERSION=8.1
PHP_VERSION=${1:-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" && { test -z "$TAG" && {
echo "Can't get new tag of $REPO/$IMAGE container --> existing" echo "Can't get new tag of $REPO/$IMAGE container --> existing"
exit 1 exit 1
@ -26,7 +26,7 @@ echo -e "\nbuilding $REPO/$IMAGE:$TAG\n"
cd $(dirname $0) cd $(dirname $0)
docker pull $BASE 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 docker push $REPO/$IMAGE:$TAG
# tag master by major PHP version eg. 8.1 # tag master by major PHP version eg. 8.1