Skip to content

Commit

Permalink
Drop PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
back-2-95 committed Nov 22, 2024
1 parent 8786265 commit b8b5718
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 84 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ ENV variables:

Tags:

- `druidfi/php:8.1` and `druidfi/php:8.1.x`
- `druidfi/php:8.2` and `druidfi/php:8.2.x`
- `druidfi/php:8`, `druidfi/php:8.3`, `druidfi/php:8.3.x` and `druidfi/php:latest`
- `druidfi/php:8.4` and `druidfi/php:8.4.x`
Expand All @@ -44,7 +43,6 @@ Added features:

Tags:

- `druidfi/php-fpm:8.1` and `druidfi/php-fpm:8.1.x`
- `druidfi/php-fpm:8.2` and `druidfi/php-fpm:8.2.x`
- `druidfi/php-fpm:8`, `druidfi/php-fpm:8.3`, `druidfi/php-fpm:8.3.x` and `druidfi/php-fpm:latest`
- `druidfi/php-fpm:8.4` and `druidfi/php-fpm:8.4.x`
Expand All @@ -58,7 +56,6 @@ Added features:

Tags:

- `druidfi/drupal:php-8.1` and `druidfi/drupal:php-8.1.x`
- `druidfi/drupal:php-8.2` and `druidfi/drupal:php-8.2.x`
- `druidfi/drupal:php-8`, `druidfi/drupal:php-8.3`, `druidfi/drupal:php-8.3.x` and `druidfi/drupal:latest`
- `druidfi/drupal:php-8.4` and `druidfi/drupal:php-8.4.x`
Expand All @@ -82,7 +79,6 @@ ENV variables:

### druidfi/drupal-web variant

- `druidfi/drupal-web:php-8.1`, `druidfi/drupal-web:php-8.1.x` and `druidfi/drupal-web:v8.1.x`
- `druidfi/drupal-web:php-8.2`, `druidfi/drupal-web:php-8.2.x` and `druidfi/drupal-web:v8.2.x`
- `druidfi/drupal-web:php-8`, `druidfi/drupal-web:php-8.3`, `druidfi/drupal-web:php-8.3.x`, `druidfi/drupal-web:v8.3.x` and `druidfi/drupal-web:latest`
- `druidfi/drupal-web:php-8.4`, `druidfi/drupal-web:php-8.4.x` and `druidfi/drupal-web:v8.4.x`
Expand Down
8 changes: 2 additions & 6 deletions bin/helper
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
COMMAND=$1
LATEST_ALPINE_MINOR=3.20
LATEST_ALPINE_VERSION=3.20.3
FALLBACK_VERSION_81="8.1.31"
FALLBACK_VERSION_82="8.2.26"
FALLBACK_VERSION_83="8.3.14"
FALLBACK_VERSION_84="8.4.1"
Expand Down Expand Up @@ -33,10 +32,7 @@ then
BRANCH=${2:-8.2}
#ALPINE=${LATEST_ALPINE_VERSION}

if [[ $BRANCH == 8.1 ]]
then
URL="https://git.alpinelinux.org/aports/plain/testing/php81/APKBUILD"
elif [[ $BRANCH == 8.2 ]]
if [[ $BRANCH == 8.2 ]]
then
URL="https://git.alpinelinux.org/aports/plain/community/php82/APKBUILD?h=3.20-stable"
elif [[ $BRANCH == 8.3 ]]
Expand All @@ -56,9 +52,9 @@ then
if [[ "$CODE" =~ ^2 ]]; then
echo "$RESPONSE" | cat | grep -m 1 -i "pkgver=" | cut -d "=" -f2 && exit 0
else
if [[ "$BRANCH" == "8.1" ]]; then echo "$CODE $FALLBACK_VERSION_81"; fi
if [[ "$BRANCH" == "8.2" ]]; then echo "$CODE $FALLBACK_VERSION_82"; fi
if [[ "$BRANCH" == "8.3" ]]; then echo "$CODE $FALLBACK_VERSION_83"; fi
if [[ "$BRANCH" == "8.4" ]]; then echo "$CODE $FALLBACK_VERSION_84"; fi
exit 0
fi

Expand Down
34 changes: 0 additions & 34 deletions php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,6 @@ ENTRYPOINT ["/sbin/tini", "--", "entrypoint"]

CMD ["tail", "-f", "/dev/null"]

#
# PHP 8.1
#
FROM base AS build-php-81

ENV PHP_MAJOR_VERSION=8
ENV PHP_SHORT_VERSION=81
ENV PHP_INSTALL_VERSION=81

RUN sudo -s <<EOF
apk --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing add libzip \
php81 php81-{curl,fileinfo,iconv,mbstring,opcache,openssl,phar,session,zip} \
php81-pecl-{apcu,imagick,redis,uploadprogress,xdebug}
ln -sfn /usr/bin/php81 /usr/bin/php
EOF

COPY files/etc/php/conf.d/* /etc/php81/conf.d/

#
# PHP 8.2
#
Expand Down Expand Up @@ -168,15 +150,6 @@ EOF
# PHP-FPM
#

FROM final-php AS build-php-fpm-81

RUN sudo -s <<EOF
apk --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing add php81-fpm
ln -sfn /usr/sbin/php-fpm81 /usr/sbin/php-fpm
EOF

COPY files/etc/php/php-fpm.d/www.conf.ep /etc/php81/php-fpm.d/www.conf.ep

FROM final-php AS build-php-fpm-82

RUN sudo -s <<EOF
Expand Down Expand Up @@ -224,13 +197,6 @@ CMD ["sudo", "-E", "LD_PRELOAD=/usr/lib/preloadable_libiconv.so", "php-fpm", "-F
# Drupal base
#

FROM final-php-fpm AS drupal-php-81

RUN sudo -s <<EOF
apk --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing add mysql-client openssh rsync mariadb-connector-c \
php81-{bcmath,ctype,dom,exif,gd,intl,pdo,pdo_mysql,simplexml,soap,sockets,sodium,tokenizer,xml,xmlreader,xmlwriter}
EOF

FROM final-php-fpm AS drupal-php-82

RUN sudo -s <<EOF
Expand Down
4 changes: 1 addition & 3 deletions php/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ BAKE_FLAGS := --pull --no-cache --push

PHONY += php-bake-all
php-bake-all: ## Bake all PHP images
@PHP81_MINOR=$(call get_php_minor,8.1) PHP82_MINOR=$(call get_php_minor,8.2) PHP83_MINOR=$(call get_php_minor,8.3) PHP84_MINOR=$(call get_php_minor,8.4) \
@PHP82_MINOR=$(call get_php_minor,8.2) PHP83_MINOR=$(call get_php_minor,8.3) PHP84_MINOR=$(call get_php_minor,8.4) \
docker buildx bake -f php/docker-bake.hcl $(BAKE_FLAGS)

PHONY += php-bake-print
Expand All @@ -19,8 +19,6 @@ php-bake-test: php-bake-all run-php-tests ## CI test for PHP images

PHONY += run-php-tests
run-php-tests:
$(call step,Run tests in druidfi/drupal-web:php-8.1)
@docker run --rm -t -v $(CURDIR)/tests/scripts:/app/scripts druidfi/drupal-web:php-8.1 /app/scripts/tests.sh
$(call step,Run tests in druidfi/drupal-web:php-8.2)
@docker run --rm -t -v $(CURDIR)/tests/scripts:/app/scripts druidfi/drupal-web:php-8.2 /app/scripts/tests.sh
$(call step,Run tests in druidfi/drupal-web:php-8.3)
Expand Down
40 changes: 4 additions & 36 deletions php/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ variable "REPO_DRUPAL_WEB" {
default = "druidfi/drupal-web"
}

variable "PHP81_MINOR" {}
variable "PHP82_MINOR" {}
variable "PHP83_MINOR" {}
variable "PHP84_MINOR" {}
Expand All @@ -28,23 +27,19 @@ group "default" {
}

group "php-variants" {
targets = ["php-81", "php-82", "php-83", "php-84"]
targets = ["php-82", "php-83", "php-84"]
}

group "php-fpm-variants" {
targets = ["php-fpm-81", "php-fpm-82", "php-fpm-83", "php-fpm-84"]
targets = ["php-fpm-82", "php-fpm-83", "php-fpm-84"]
}

group "drupal-fpm-variants" {
targets = ["drupal-fpm-81", "drupal-fpm-82", "drupal-fpm-83", "drupal-fpm-84"]
targets = ["drupal-fpm-82", "drupal-fpm-83", "drupal-fpm-84"]
}

group "drupal-web-variants" {
targets = ["drupal-web-81", "drupal-web-82", "drupal-web-83", "drupal-web-84"]
}

group "php-83" {
targets = ["php-83", "php-fpm-83", "drupal-fpm-83", "drupal-web-83"]
targets = ["drupal-web-82", "drupal-web-83", "drupal-web-84"]
}

target "common" {
Expand All @@ -67,16 +62,6 @@ target "php" {
target = "final-php"
}

target "php-81" {
inherits = ["common", "php"]
args = {
ALPINE_VERSION = "${ALPINE_VERSION}"
PHP_VERSION = "8.1"
PHP_SHORT_VERSION = "81"
}
tags = ["${REPO_BASE}:8.1", "${REPO_BASE}:${PHP81_MINOR}"]
}

target "php-82" {
inherits = ["common", "php"]
args = {
Expand Down Expand Up @@ -116,11 +101,6 @@ target "php-fpm" {
target = "final-php-fpm"
}

target "php-fpm-81" {
inherits = ["common", "php-81", "php-fpm"]
tags = ["${REPO_FPM}:8.1", "${REPO_FPM}:${PHP81_MINOR}"]
}

target "php-fpm-82" {
inherits = ["common", "php-82", "php-fpm"]
tags = ["${REPO_FPM}:8.2", "${REPO_FPM}:${PHP82_MINOR}"]
Expand All @@ -140,12 +120,6 @@ target "php-fpm-84" {
# Drupal (PHP-FPM)
#

target "drupal-fpm-81" {
inherits = ["common", "php-81", "php-fpm"]
target = "drupal-php-81"
tags = ["${REPO_DRUPAL_FPM}:php-8.1", "${REPO_DRUPAL_FPM}:php-${PHP81_MINOR}"]
}

target "drupal-fpm-82" {
inherits = ["common", "php-82", "php-fpm"]
target = "drupal-php-82"
Expand All @@ -168,12 +142,6 @@ target "drupal-fpm-84" {
# Drupal (PHP-FPM + Nginx)
#

target "drupal-web-81" {
inherits = ["common", "php-81", "php-fpm"]
target = "drupal-web"
tags = ["${REPO_DRUPAL_WEB}:php-8.1", "${REPO_DRUPAL_WEB}:php-${PHP81_MINOR}", "${REPO_DRUPAL_WEB}:v${PHP81_MINOR}"]
}

target "drupal-web-82" {
inherits = ["common", "php-82", "php-fpm"]
target = "drupal-web"
Expand Down
2 changes: 1 addition & 1 deletion tests/wp-test/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:

db:
container_name: ${COMPOSE_PROJECT_NAME}-db
image: druidfi/mysql:5.7-drupal
image: druidfi/mysql:8.0-drupal-lts
ports:
- 3306

Expand Down

0 comments on commit b8b5718

Please sign in to comment.