Installation
serversideup/php
is compatible with any container orchestrator that supports Docker images (Kubernetes, Docker Swarm, Docker Compose, HashiCorp Nomad, etc.).
All images are hosted on DockerHub for free.
Image Variations
⚙️ Variation | 🚀 Version |
---|---|
cli | |
fpm | |
fpm-apache | |
fpm-nginx |
Selecting the right variation
There are 4 main variations.
CLI
If you need to run a quick command with composer
or use PHP to run a CLI program only, this might be a great option for you.
FPM
The fpm
variation is great for people who need to run a PHP "backend" if they already have a proxy serving static content. If you're using FPM only, that means you're probably at a larger scale.
FPM-Apache
The fpm-apache
variation is meant for users who want to run something like WordPress with Docker. Apache is configured to be a "reverse proxy", which will serve any static content with Apache and serve any PHP requests with PHP-FPM.
FPM-NGINX
The fpm-nginx
variation is great for people who want to run Laravel applications or similar. This allows you to serve static content quickly with NGINX but also pass PHP requests to PHP-FPM. This variation is great place to start if you're trying to containerize your application easily.
How images are tagged
Image tag standard
serversideup/php:{{php-version}}-{{variation-name}}
For example...Selecting PHP 8.1 with FPM + NGINX
serversideup/php:8.1-fpm-nginx
Downloading an image
In the simplest form of using the image, you can simply pull it down.
Pull an image with Docker
docker pull serversideup/php:8.1-fpm-nginx
If you'd like to explore the image a little bit more, you can run bash
on the image and view the structure of everything.
Explore the image with Bash
docker run --rm --name php -it serversideup/php:8.1-fpm-nginx bash
Running with a container orchestrator
serversideup/php
is compatible with any container orchestrator that supports Docker images. Learn more below on how to use this image with the orchestrator of your choice.
Docker
Docker is a tool that enables users to deploy applications inside isolated containers for easy development and deployment.
Kubernetes
Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications.
HashiCorp Nomad
HashiCorp Nomad is an open-source cluster scheduler that automates deployment, management & scaling of apps across public, private or hybrid clouds.