š (PHP) PHP + Nginx Docker images for both production and development.
500K+
š (PHP) PHP + Nginx Docker images for both production and development.
Our PHP Docker images, available on Docker Hubā , are designed for easy configuration of PHP and PHP-FPM settings via environment variables, with no image rebuild required.
These images also come with the latest version of Composerā .
docker run -p 80:80 -p 443:443 -p 443:443/udp \
-v ./myproject:/var/www/html \
shinsenter/phpfpm-nginx:latest
Refer to our documentationā to learn how to customize these Docker images for your projects.
The Docker images come with pre-generated SSL certificate files for testing HTTPS locally:
To use valid HTTPS certificates in production, replace these files with your own certificate and key, either by copying or mounting them from the host into the container.
FROM shinsenter/phpfpm-nginx:latest
# Copy your own certs into the container
COPY my_domain.crt /etc/ssl/site/server.crt
COPY my_domain.key /etc/ssl/site/server.key
docker run -p 80:80 -p 443:443 -p 443:443/udp \
-v ./myproject:/var/www/html \
-v ./my_domain.crt:/etc/ssl/site/server.crt \
-v ./my_domain.key:/etc/ssl/site/server.key \
shinsenter/phpfpm-nginx:latest
services:
web:
image: shinsenter/phpfpm-nginx:latest
volumes:
- ./myproject:/var/www/html
- ./my_domain.crt:/etc/ssl/site/server.crt
- ./my_domain.key:/etc/ssl/site/server.key
You can add your Nginx configurations by mounting or copying your *.conf files into the /etc/nginx/custom.d/ directory of the container.
The config files here will be loaded into the Nginx's default server.
ā ļø Note: Since there are already some common configs in this directory, please avoid mounting or replacing an entire different directory into
/etc/nginx/custom.d/.
Check our Docker Hubā for all available platforms. The Docker images are available for both Debian and Alpine versions.
The release versions on this GitHub repositoryā don't guarantee that Docker images built from the same source code will always be identical.
We build new Docker images daily to ensure they stay up-to-date with the latest upstream updates for PHP, base OS, Composer, etc. The images in this repo are regularly updated under the same tag names.
But you can pull the image from shinsenter/phpfpm-nginx:latest,
and tag it with a name that indicates its stability,
such as your-repo/phpfpm-nginx:stable using the below commands:
docker pull shinsenter/phpfpm-nginx:latest
docker tag shinsenter/phpfpm-nginx:latest your-repo/phpfpm-nginx:stable
docker push your-repo/phpfpm-nginx:stable
Then use the image your-repo/phpfpm-nginx:stable as a base image to build containers for production.
If you find these images useful, consider donating via PayPalā or opening an issue on GitHubā .
This project is licensed under the terms of the GNU General Public License v3.0ā .
Please respect the work that went into these images. If you reuse ideas from this project, credit is appreciated.
From Vietnam š»š³ with love.
Content type
Image
Digest
sha256:326824ed5ā¦
Size
91.5 MB
Last updated
about 15 hours ago
docker pull shinsenter/phpfpm-nginxPulls:
4,441
Last week