Skip to content

Commit 11e54f6

Browse files
committed
Fix broken test by adding ansible-galaxy install command.
1 parent 1a0e857 commit 11e54f6

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ install:
66
# Install Ansible.
77
- pip install ansible
88

9+
# Install role dependencies.
10+
- ansible-galaxy install -r requirements.yml
11+
912
script:
1013
# Build the container.
1114
- ansible-playbook main.yml

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ Currently maintained versions include:
2323

2424
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:
2525

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
2727

2828
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:
2929

3030
```
3131
version: "3"
3232

3333
services:
34-
php:
34+
php-apache:
3535
image: geerlingguy/php-apache:latest
3636
container_name: php-apache
3737
ports:
@@ -70,7 +70,7 @@ If you want to run multiple webroots, or need to further customize the Apache Vi
7070
- ./web:/var/www/html:rw,delegated
7171
- ./virtualhosts.conf:/etc/apache2/sites-enabled/vhosts.conf:rw
7272

73-
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).
7474

7575
## Management with Ansible
7676

@@ -83,9 +83,15 @@ Before using this project to build and maintain PHP images for Docker, you need
8383

8484
### Build the image
8585

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+
8692
ansible-playbook main.yml
8793

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.
8995

9096
### Push the image to Docker Hub
9197

0 commit comments

Comments
 (0)