Felling like supporting me in my projects use donate button. Thank You!
This is Docker Image with Apache + PHP-FPM combo using polinux/supervisor docker image as base.
For different PHP versions, look up different branches of this repository. On Docker Hub you can find them under different tags:
PHP Version | Image Name | Branch | Status |
---|---|---|---|
7.2 | polinux/httpd-php:php72 |
php-7.2 | |
7.1 | polinux/httpd-php:php71 |
php-7.1 | |
7.0 | polinux/httpd-php:php70 |
php-7.0 | |
5.6 | polinux/httpd-php:php56 |
php-5.6 |
This image have inotify
installed and set to gracefuly reload when Apache config changes, including VHosts.
Default web directory is set to /var/www/html/
.
info.php
is present in this image. just got to http://localhost/info.php
Multiple versions of php can be selected from tags in Docker Hub.
- Ruby 2.0, Bundler
- NodeJS and NPM
- NPM packages like
gulp
,grunt
,bower
,browser-sync
php-fpm
php-gd
php-mbstring
php-mcrypt
php-pdo
ImageMagick
GraphicsMagick
gulp
grunt-cli
bower
browser-sync
node
ruby
bundler
memcached
redis
git
Variable | DefaultSettings | Info |
---|---|---|
LOG_LEVEL |
info |
Specify log level Apache should when started. Apache Log Levels |
DEFAULT_CONFIG |
true |
Use default config provided by Apache package - Change to false when using custom config |
docker run \
-d \
--name httpd-php \
-p 80:80 \
polinux/httpd-php
docker run \
-d \
--name httpd-php \
-p 80:80 \
-e LOG_LEVEL="debug" \
polinux/httpd-php:php71
docker build -t polinux/httpd-php .
Use docker command to see if all required containers are up and running:
$ docker ps
Check logs of httpd-php server container:
$ docker logs httpd-php
Sometimes you might just want to review how things are deployed inside a running container, you can do this by executing a bash shell through docker's exec command:
docker exec -ti httpd-php /bin/bash
History of an image and size of layers:
docker history --no-trunc=true polinux/httpd-php | tr -s ' ' | tail -n+2 | awk -F " ago " '{print $2}'
Przemyslaw Ozgo ([email protected])