Docker base image PHP-FPM 8.1 & Nginx 1.22, build on [Alpine Linux](https://www.alpinelinux.org/).

ksieren b4ab485291 add openssh 2 年之前
rootfs 1e6164dea6 change doc root to /var/www/html 2 年之前
Dockerfile b4ab485291 add openssh 2 年之前
Jenkinsfile 12109a096a add jenkinsfile 3 年之前
LICENSE 3e8d3c4db4 initial commit 3 年之前
README.md b2d5a9f118 add alpine base image with php-fpm 8.2 and nginx 1.22.1 2 年之前

README.md

Docker PHP-FPM 8.2 & Nginx 1.22.1 on Alpine Linux

Example PHP-FPM 8.2 & Nginx 1.22.1 setup for Docker, build on Alpine Linux. The image is only +/- 25MB large.

Repository: https://git2.meramo.org/Infrastructure/alpine-phpfpm-nginx-baseimage.git

  • Built on the lightweight and secure Alpine Linux distribution
  • Very small Docker image size (+/-65MB)
  • Uses PHP 8.2 for better performance, lower cpu usage & memory footprint
  • Multi-arch support: 386, amd64, arm/v6, arm/v7, arm64, ppc64le, s390x
  • Optimized for 100 concurrent users
  • Optimized to only use resources when there's traffic (by using PHP-FPM's ondemand PM)
  • Use of runit instead of supervisord to reduce memory footprint
  • The servers Nginx, PHP-FPM run under a non-privileged user (nobody) to make it more secure
  • The logs of all the services are redirected to the output of the Docker container (visible with docker logs -f <container name>)
  • Follows the KISS principle (Keep It Simple, Stupid) to make it easy to understand and adjust the image to your needs

Usage

Start the Docker container:

docker run -p 80:8080 kerstinsieren/alpine-phpfpm-nginx-baseimage

See the PHP info on http://localhost, or the static html page on http://localhost/test.html

Or mount your own code to be served by PHP-FPM & Nginx

docker run -p 8080:80 -v ~/my-codebase:/var/www/html kerstinsieren/alpine-phpfpm-nginx-baseimage