This repository will provide you a fully functional PHP-FPM 7.4 Docker image built from official sources nightly. It provides the base for Devilbox PHP-FPM Docker images.
Docker Hub | Upstream Project |
---|---|
![]() |
- PHP-FPM 5.2
- PHP-FPM 5.3
- PHP-FPM (all PHP versions)
# Build the Docker image locally
make build
# Rebuild (without cache) the Docker image locally
make rebuild
# Test the Docker image after building
make test
Add the following FROM
line into your Dockerfile:
FROM devilbox/php-fpm-7.4:latest
Create a temporary directory, navigate into it and copy/paste the commands below to get started.
mkdir htdocs
echo "<?php echo 'hello world';" > htdocs/index.php
docker run -d --rm --name devilbox-php-fpm-7-4 \
-v $(pwd)/htdocs:/var/www/default/htdocs devilbox/php-fpm-7.4
docker run -d --rm --name devilbox-nginx-stable \
-v $(pwd)/htdocs:/var/www/default/htdocs \
-e PHP_FPM_ENABLE=1 \
-e PHP_FPM_SERVER_ADDR=devilbox-php-fpm-7-4 \
-p 8080:80 \
--link devilbox-php-fpm-7-4 \
devilbox/nginx-stable
Open up your browser at http://127.0.0.1:8080
Copyright (c) 2018 cytopia