unit-php
š (PHP) PHP + Nginx Unit Docker images for both production and development.
50K+
š (PHP) PHP + Nginx Unit 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. This approach eliminates the need to rebuild images when making configuration changes.
These images also come with the latest version of Composerā , enabling you to start projects quickly without additional installations.
docker run -p 80:80 -p 443:443 -p 443:443/udp \
-v ./myproject:/var/www/html \
shinsenter/unit-php: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 websites locally.
The files are:
To use valid HTTPS certificates for your production website, you need to replace these files with your own valid SSL certificates by copying or mounting them from the host machine into the container. Simply overwrite the default certificate files with your own valid certificate and key files to enable true HTTPS for your production website.
FROM shinsenter/unit-php: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/unit-php:latest
services:
web:
image: shinsenter/unit-php:latest
volumes:
- ./myproject:/var/www/html
- ./my_domain.crt:/etc/ssl/site/server.crt
- ./my_domain.key:/etc/ssl/site/server.key
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/unit-php:latest,
and tag it with a name that indicates its stability,
such as your-repo/unit-php:stable using the below commands:
docker pull shinsenter/unit-php:latest
docker tag shinsenter/unit-php:latest your-repo/unit-php:stable
docker push your-repo/unit-php:stable
Then use the image your-repo/unit-php: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ā .
Your support helps maintain and improve these images for the community.
This project is licensed under the terms of the GNU General Public License v3.0ā .
Please respect the intellectual efforts involved in creating these images. If you intend to copy or use ideas from this project, proper credit is appreciated.
From Vietnam š»š³ with love.
Content type
Image
Digest
sha256:ccaa0f9caā¦
Size
110.7 MB
Last updated
4 months ago
docker pull shinsenter/unit-php:dev-php8.2Pulls:
6
Last week