Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Neos8/php8 Support (WIP) #33

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
target: [ base, behat ]
php-version: [7.2, 7.3]
php-version: [7.2, 7.3, 8]

steps:
-
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -323,15 +324,15 @@ 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`.
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
Expand Down