Docker Hub: https://hub.docker.com/r/edyan/apache
Docker container containing Apache that connects to an FPM service.
Add the following to your docker-compose.yml, assuming that your PHP VM is named php
(see edyan/php).
apache:
image: edyan/apache:2.2
volumes:
- ./www:/var/www
ports:
- 80:80
Two variables have been created, to override the user and group that owns Apache (and all its files). That's useful if you need to mount a volume and own the files.
These environment variables are APACHE_UID
and APACHE_GID
.
You can override an .htaccess
file by putting an .htaccess.local
, which could be interesting if you have to keep the main file in a git repository.
To use a specific Apache version, append the version number to the image name.
Eg: image: edyan/apache:2.4-slim
The following Apache versions are available:
- Apache 2.4-slim (Alpine 3)
- Apache 2.4 (buster stable)
- Apache 2.2 (wheezy stable / EOL as we need now to do some strange tricks to make it work)