fer-ri / nginx-fpm

Nginx and PHP FPM service in one image, based on Alpine and S6 Overlay.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker Nginx + PHP FPM

Docker Pulls

Nginx and PHP FPM service in one image, based on Alpine and S6 Overlay.

Usage

docker run --rm -it -v ~/my/workspace:/var/www/public -p 80:8080 ferri/nginx-fpm:8.0

For laravel or another framework that serve from public subfolder, then you just mount to /var/www

docker run --rm -it -v ~/my/laravel-project:/var/www -p 80:8080 ferri/nginx-fpm:8.0

Tags

Tag Alpine Image Tag
7.4 alpine:3.14 ferri/nginx-fpm:7.4
8.0 alpine:3.14 ferri/nginx-fpm:8.0

PHP Packages

These packages already included inside the image

  • fpm
  • bcmath
  • ctype
  • fileinfo
  • json
  • mbstring
  • openssl
  • pdo_mysql
  • tokenizer
  • xml
  • session
  • curl

Production

For production, consider to extend this image and adding php-opcache, remove php-cli and enable the setting opcache.* from 00-docker.ini

FROM ferri/nginx-fpm:8.0

RUN apk add --no-cache php8-opcache \
    && apk del php8-cli

# Copy the newer setting that enabled opcache
COPY files/php8 /

About

Nginx and PHP FPM service in one image, based on Alpine and S6 Overlay.


Languages

Language:Roff 65.4%Language:Makefile 34.6%