Skip to content

Commit d7818da

Browse files
committed
Support PHP 8.1.
1 parent 68954c7 commit d7818da

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
strategy:
2121
matrix:
2222
php_version:
23+
- '8.1'
2324
- '7.4'
2425
- '7.3'
2526
- '7.2'
@@ -57,6 +58,7 @@ jobs:
5758
strategy:
5859
matrix:
5960
php_version:
61+
- '8.1'
6062
- '7.4'
6163
- '7.3'
6264
- '7.2'
@@ -102,7 +104,7 @@ jobs:
102104
docker push geerlingguy/php-apache:${{ matrix.php_version }}.${php_release_version}
103105
104106
# Push latest tag if building latest version.
105-
if [[ "${{ matrix.php_version }}" == "7.4" ]]; then
107+
if [[ "${{ matrix.php_version }}" == "8.1" ]]; then
106108
docker tag geerlingguy/php-apache:${{ matrix.php_version }} geerlingguy/php-apache:latest
107109
docker push geerlingguy/php-apache:latest
108110
fi

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ This project is composed of three main parts:
1212

1313
Currently maintained versions include:
1414

15-
- `7.4`, `7.4.x`, `latest`: PHP 7.4.x
15+
- `8.1`, `8.1.x`, `latest`: PHP 8.1.x
16+
- `7.4`, `7.4.x`: PHP 7.4.x
1617
- `7.3`, `7.3.x`: PHP 7.3.x
1718
- `7.2`, `7.2.x`: PHP 7.2.x
1819
- `7.1`, `7.1.x`: PHP 7.1.x
@@ -66,7 +67,7 @@ If you want to run multiple webroots, or need to further customize the Apache Vi
6667
- ./web:/var/www/html:rw,delegated
6768
- ./virtualhosts.conf:/etc/apache2/sites-enabled/vhosts.conf:rw
6869

69-
Similarly, you can mount a PHP config file to the path `/etc/php/7.4/apache2/php.ini` (substitute whatever PHP version you're currently using in that path).
70+
Similarly, you can mount a PHP config file to the path `/etc/php/8.1/apache2/php.ini` (substitute whatever PHP version you're currently using in that path).
7071

7172
## Management with Ansible
7273

@@ -85,7 +86,7 @@ First, install Ansible role requirements:
8586

8687
Then, make sure Docker is running, and run the playbook to build the container:
8788

88-
ansible-playbook --extra-vars="@vars/7.4.yml" main.yml
89+
ansible-playbook --extra-vars="@vars/8.1.yml" main.yml
8990

9091
(Substitute whatever supported PHP version you desire in the vars path) Once the image is built, you can run `docker images` to see the `php-apache` image that was generated.
9192

vars/8.1.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
php_version: '8.1'
3+
php_packages_extra:
4+
- libapache2-mod-php8.1

0 commit comments

Comments
 (0)