You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-4Lines changed: 10 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -23,15 +23,15 @@ Currently maintained versions include:
23
23
24
24
If you want to use the `geerlingguy/php-apache` image from Docker Hub, you don't need to install or use this project at all. You can quickly build a PHP container locally with:
25
25
26
-
docker run -d --name=php -p 80:80 geerlingguy/php-apache:latest /usr/sbin/apache2ctl -D FOREGROUND
26
+
docker run -d --name=php-apache -p 80:80 geerlingguy/php-apache:latest /usr/sbin/apache2ctl -D FOREGROUND
27
27
28
28
You can also wrap up that configuration in a `Dockerfile` and/or a `docker-compose.yml` file if you want to keep things simple. For example:
29
29
30
30
```
31
31
version: "3"
32
32
33
33
services:
34
-
php:
34
+
php-apache:
35
35
image: geerlingguy/php-apache:latest
36
36
container_name: php-apache
37
37
ports:
@@ -70,7 +70,7 @@ If you want to run multiple webroots, or need to further customize the Apache Vi
Similarly, you can mount a PHP config file to the path `/etc/php/TODO`.
73
+
Similarly, you can mount a PHP config file to the path `/etc/php/7.2/apache2/php.ini` (substitute whatever PHP version you're currently using in that path).
74
74
75
75
## Management with Ansible
76
76
@@ -83,9 +83,15 @@ Before using this project to build and maintain PHP images for Docker, you need
83
83
84
84
### Build the image
85
85
86
+
First, install Ansible role requirements:
87
+
88
+
ansible-galaxy install -r requirements.yml
89
+
90
+
Then, make sure Docker is running, and run the playbook to build the container:
91
+
86
92
ansible-playbook main.yml
87
93
88
-
Once the image is built, you can run `docker images` to see the `TODO` image that was generated.
94
+
Once the image is built, you can run `docker images` to see the `php-apache` image that was generated.
0 commit comments