From 3da73f76c67a3ac0117eca1881836a96a5dcfdd7 Mon Sep 17 00:00:00 2001 From: Remus Lazar Date: Tue, 31 May 2022 15:00:02 +0200 Subject: [PATCH 1/3] Add Neos8/php8 Support (WIP) --- Makefile | 3 +++ README.md | 13 +++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 236f921..5bd9102 100644 --- a/Makefile +++ b/Makefile @@ -19,3 +19,6 @@ build-7.2: build-7.3: docker buildx build --push --platform ${PLATFORM} --build-arg PHP_VERSION="7.3" --target base -t croneu/neos:7.3 . docker buildx build --push --platform ${PLATFORM} --build-arg PHP_VERSION="7.3" --target behat -t croneu/neos:7.3-behat . + +build-8: + docker buildx build --push --platform ${PLATFORM} --build-arg PHP_VERSION="8" --build-arg ALPINE_VERSION="3.16" --target base -t croneu/neos:8 . diff --git a/README.md b/README.md index 7dc2ab7..ac32481 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,13 @@ versions which run with `PHP 7.2` or `PHP 7.3`. This repository builds two distinct Docker Images: -| Tag | Description | -| ----------------- | ----------- | -| 7.2 | PHP 7.2 based docker image, useful to run a Neos project in docker for development purposes.| +| Tag | Description | +|---------|---------------------------------------------------------------------------------------------------------------| +| 7.2 | PHP 7.2 based docker image, useful to run a Neos project in docker for development purposes. | | 7.2-behat | PHP 7.2 based image with some add-ons for behat tests (supports also unattended use for e.g. circleCI/Travis) | -| 7.3 | PHP 7.3 based docker image, useful to run a Neos project in docker for development purposes.| +| 7.3 | PHP 7.3 based docker image, useful to run a Neos project in docker for development purposes. | | 7.3-behat | PHP 7.3 based image with some add-ons for behat tests (supports also unattended use for e.g. circleCI/Travis) | +| 8 | PHP 8.x based docker image, useful to run a Neos 8 project in docker for development purposes. | ## Usage in a nutshell @@ -323,7 +324,7 @@ This will create both images from scratch Use the available targets in the `Makefile`, e.g. ``` -make build-7.3 +make build-8 ``` Important note: There is no automation on Docker Hub to build Docker Images other than `latest`. @@ -331,7 +332,7 @@ Use the `push-*` targets in the Makefile to push the images to Docker Hub. ``` docker login -make push-7.3 +make push-8 ``` ### Test the Docker Image From 1b6a5181053ef20bf9a904fa31b41d036efac2f3 Mon Sep 17 00:00:00 2001 From: Remus Lazar Date: Tue, 31 May 2022 15:23:40 +0200 Subject: [PATCH 2/3] Remove UsePAM setting for Alpine 3.16 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7358990..94f579c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -104,8 +104,8 @@ RUN echo "xdebug.remote_enable=1" >> $PHP_INI_DIR/conf.d/docker-php-ext-xdebug.i && sed -i -r 's/.?PasswordAuthentication.+/PasswordAuthentication no/' /etc/ssh/sshd_config \ && sed -i -r 's/.?ChallengeResponseAuthentication.+/ChallengeResponseAuthentication no/' /etc/ssh/sshd_config \ && sed -i -r 's/.?PermitRootLogin.+/PermitRootLogin no/' /etc/ssh/sshd_config \ - # we use PAM to make ssh daemon to load the /etc/environment (see "00-init-ssh") \ - && sed -i -r 's/.?UsePAM.+/UsePAM yes/' /etc/ssh/sshd_config \ + # we use PAM to make ssh daemon to load the /etc/environment (see "00-init-ssh"); not required for apline 3.16 \ + && cat /etc/alpine-release | grep "3.16">/dev/null || sed -i -r 's/.?UsePAM.+/UsePAM yes/' /etc/ssh/sshd_config \ && sed -i '/secure_path/d' /etc/sudoers # Copy container-files From 1bccde44686dcf8a4686517e04ca415f5229ae68 Mon Sep 17 00:00:00 2001 From: Remus Lazar Date: Tue, 31 May 2022 15:23:56 +0200 Subject: [PATCH 3/3] Update ci settings for php8 --- .github/workflows/build-and-push.yml | 7 +++++++ .github/workflows/build-and-test.yml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index 7faaf97..43f3ab6 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -19,6 +19,13 @@ jobs: docker-tag: '' - target: behat docker-tag: '-behat' + # use specific alpine versions for various php versions + - php-version: 7.2 + alpine-version: 3.8 + - php-version: 7.3 + alpine-version: 3.8 + - php-version: 8 + alpine-version: 3.16 steps: - diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 4b43b01..a86f17e 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: target: [ base, behat ] - php-version: [7.2, 7.3] + php-version: [7.2, 7.3, 8] steps: -