- About
- What's included
- Tags
- Simple Usage
- Simple docker-compose example
- More detailed usage
- PHP enabled modules (php -m)
- Links
These images are configured:
- by using only official public images
- by following the official Docker best practices
- by following the official PHP image best practices
- based on apache 2.4 + php 7.4 - 7.3 - 7.2 (from latest PHP Official 7.x-apache-buster)
- enabled most common php ext (like opcache, gd, imagick. See below the complete list)
- added certbot to bettter working with apache
Each tag points to respective latest release
Apache + PHP 7.4 | Apache + PHP 7.3 | Apache + PHP 7.2 |
---|---|---|
latest |
||
7.4 |
7.3 |
7.2 |
-
Pull
docker pull demartis/apache-php:7.4
-
Check
docker run --rm demartis/apache-php:7.4 apache2 -v && php --version && php -m
-
Run
docker run -d \ -p 127.0.0.1:80:80 \ demartis/apache-php:7.4
-
check on you browser http://127.0.0.1/phpinfo.php
# docker-compose.yml
version: "3.8"
services:
web:
image: demartis/apache-php:7.4
ports:
- "80:80"
- "443:443"
volumes:
- ./data/var/www:/var/www:cached
- ./data/etc/sites-available:/etc/apache2/sites-available/
- ./data/etc/sites-enabled:/etc/apache2/sites-enabled/
- ./data/etc/php.ini:/usr/local/etc/php/php.ini
- ./logs/apache/:/var/log/apache2
- ./data/etc/letsencrypt/:/etc/letsencrypt
[PHP Modules]
- apcu
- calendar
- Core
- ctype
- curl
- date
- dom
- exif
- fileinfo
- filter
- ftp
- gd
- gettext
- hash
- iconv
- imagick
- intl
- json
- libxml
- mbstring
- mcrypt
- memcached
- mysqli
- mysqlnd
- openssl
- pcntl
- pcre
- PDO
- pdo_mysql
- pdo_sqlite
- Phar
- posix
- readline
- redis
- Reflection
- session
- shmop
- SimpleXML
- sockets
- sodium
- SPL
- sqlite3
- standard
- timezonedb
- tokenizer
- xml
- xmlreader
- xmlwriter
- Zend OPcache
- zip
- zlib
[Zend Modules]
- Zend OPcache