A general Docker PHP base setup for development.
- PHP 8.0
- Filesystem supports: PNG, JPEG, ZIP, Freetype, PQ, GD
- DB support: MySQL, PostgreSQL
- Apache / NGINX server
- S6 (to supervise PHP and the server)
- Debian / Alpine OS
Sadly, no. PHP and its server pal (whether NGINX or Apache) gets too coupled together that it gets way too granular and too much of a hassle to split them up. I have since adopted the just-containers' interpretation of "The Docker Way".
More explanation can be found on their s6-overlay repo.
latest
,8.0
,8.0-apache
8.0-alpine
,8.0-apache-alpine
8.0-nginx
8.0-nginx-alpine
docker run -d --rm -p 80:80 -p 443:443 --name=testing samhwang/php
curl http://localhost
curl https://localhost/
docker stop testing
By default, if you don't specify a build arg and/or a Dockerfile, it will resort to the default, which is Debian and Apache server.
git clone [email protected]:samhwang/docker-php-image.git
cd docker-php
docker build -f docker/[debian/alpine]/[apache/nginx]/Dockerfile -t samhwang/php .