PHP is a popular general-purpose scripting language that is especially suited to web development.
Learn more about PHP: https://php.net/
This Docker container makes it easy to get an instance of PHP up and running.
Based on Official Ubuntu Docker Image with some minor hack:
- Packaging by Packer Docker builder and Ansible provisioner in single layer
- Handle
ENTRYPOINT
with catatonit - Change
User
andGroup
towww-data
- Change
DocumentRoot
to/var/www/html
- Additional PHP extensions:
- bcmath
- bz2
- calendar
- exif
- gd
- gettext
- iconv
- imap
- intl
- json
- ldap
- mbstring
- mysql
- mysqli
- opcache
- pcntl
- pdo_mysql
- pdo_pgsql
- pdo_sqlite
- pgsql
- shmop
- simplexml
- soap
- sockets
- sysvmsg
- sysvsem
- sysvshm
- tidy
- wddx
- xml
- xmlrpc
- xsl
- zip
- Additional PECL extensions:
- apcu
- apcu_bc
- geoip
- imagick
- memcached
- redis
- uuid
For the VOLUME
directory that is used to store the repository data
(amongst other things) we recommend mounting a host directory as a data
volume,
or via a named volume if using a docker version >= 1.9.
Start PHP:
# Pull latest image
docker pull alvistack/php-8.3-fpm
# Run with built-in web server
docker run \
-itd \
--rm \
--name php \
--publish 8080:8080 \
alvistack/php-8.3-fpm \
php -S 0.0.0.0:8080 -t /var/www/html
Success. PHP is now available on http://localhost:8080/phpinfo.php
Release tags could be find from GitHub Release of this repository. Thus using these tags will ensure you are running the most up to date stable version of this image.
Version tags ended with .0.0
are rolling release rebuild by GitLab
pipeline in
weekly basis. Thus using these tags will ensure you are running the
latest packages provided by the base image project.
- Code released under Apache License 2.0
- Docs released under CC BY 4.0
- Wong Hoi Sing Edison