Full Code of wyveo/nginx-php-fpm for AI

master 8c9de3840a6b cached
12 files
31.4 KB
11.4k tokens
1 requests
Download .txt
Repository: wyveo/nginx-php-fpm
Branch: master
Commit: 8c9de3840a6b
Files: 12
Total size: 31.4 KB

Directory structure:
gitextract_pq_j5nhl/

├── .dockerignore
├── .github/
│   └── workflows/
│       ├── dockerhub-description.yaml
│       └── latest.yaml
├── .gitignore
├── CHANGELOG.md
├── Dockerfile
├── LICENSE
├── README.md
├── default.conf
├── html/
│   └── index.php
├── start.sh
└── supervisord.conf

================================================
FILE CONTENTS
================================================

================================================
FILE: .dockerignore
================================================
.git
.gitignore
LICENSE
README.md
CHANGELOG.md


================================================
FILE: .github/workflows/dockerhub-description.yaml
================================================
name: Update Docker Hub Description
on:
  push:
    branches:
      - master
    paths:
      - README.md
      - .github/workflows/dockerhub-description.yaml
jobs:
  dockerHubDescription:
    runs-on: ubuntu-20.04
    steps:
    - uses: actions/checkout@v2

    - name: Docker Hub Description
      uses: peter-evans/dockerhub-description@v2.4.3
      with:
        username: ${{ secrets.DOCKER_USERNAME }}
        password: ${{ secrets.DOCKER_PASSWORD }}
        repository: wyveo/nginx-php-fpm
        short-description: ${{ github.event.repository.description }}

================================================
FILE: .github/workflows/latest.yaml
================================================
name: Publish PHP 8.2 image to Docker Hub
on:
  push:
jobs:
  build:
    runs-on: ubuntu-20.04
    steps:
    - uses: actions/checkout@v2
    - name: Publish to Registry
      uses: elgohr/Publish-Docker-Github-Action@master
      with:
        name: wyveo/nginx-php-fpm
        username: ${{ secrets.DOCKER_USERNAME }}
        password: ${{ secrets.DOCKER_PASSWORD }}
        tags: "latest"

================================================
FILE: .gitignore
================================================
# Tmp files to always-ignore extensions
*.diff
*.err
*.rej
*.swo
*~
*.sass-cache
*.orig

# OS
.DS_Store
Thumbs.db

# Editors
.cache
.project
.settings
.tmproj
*.esproj
*.sublime-project
*.sublime-workspace
/.redcar
/nbproject
/.project
/.idea
/.eclipse
*.vi

# logs files
*.log


================================================
FILE: CHANGELOG.md
================================================
## [0.7.4] - 24-09-2023
### Update
- nginx version 1.25.2 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 8.2.9 - [https://secure.php.net/ChangeLog-8.php](https://secure.php.net/ChangeLog-8.php)
- composer version 2.5.8 [https://getcomposer.org/download/](https://getcomposer.org/download/)
- README update
- index.php update

## [0.7.3] - 11-03-2022
### Update
- build from debian:bullseye-slim image
- php version 8.1.3 - [https://secure.php.net/ChangeLog-8.php](https://secure.php.net/ChangeLog-8.php)
- composer version 2.2.7 [https://getcomposer.org/download/](https://getcomposer.org/download/)
- index.php update
- README update

## [0.7.2] - 02-03-2022
### Update
- nginx to version 1.21.6 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 8.0.16 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- Add GitHub actions for image publishing to Docker Hub
- README update
- LICENSE update

## [0.7.1] - 18-05-2021
- nginx version 1.19.10 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 8.0.5 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-8.php)
- composer version 2.0.13 [https://getcomposer.org/download/](https://getcomposer.org/download/)

## [0.7.0] - 06-03-2021
- nginx version 1.19.7 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 8.0.3 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-8.php)
- composer version 2.0.11 [https://getcomposer.org/download/](https://getcomposer.org/download/)

## [0.6.9] - 19-01-2021
- php version 8.0.1 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-8.php)
- nginx version 1.19.6 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)

## [0.6.8] - 10-12-2020
- add php8.0 imagick extension
- composer version 2.0.8 [https://getcomposer.org/download/](https://getcomposer.org/download/)

## [0.6.7] - 02-12-2020
- nginx version 1.19.5 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 8.0.0 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-8.php)
- composer version 2.0.7 [https://getcomposer.org/download/](https://getcomposer.org/download/)

## [0.6.6] - 15-10-2020
- nginx version 1.19.3 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.4.11 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- composer version 1.10.15 [https://getcomposer.org/download/](https://getcomposer.org/download/)

## [0.6.5] - 20-09-2020
- php version 7.4.10 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- README update
- Add 'Loaded Config' to index.php

## [0.6.4] - 05-09-2020
- nginx version 1.19.2 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.4.9 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- composer version 1.10.10 [https://getcomposer.org/download/](https://getcomposer.org/download/)

## [0.6.3] - 18-07-2020
- nginx version 1.19.1 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.4.8 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- composer version 1.10.9 [https://getcomposer.org/download/](https://getcomposer.org/download/)

## [0.6.2] - 11-03-2020
- nginx version 1.17.9 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.4.3 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- composer version 1.9.3 [https://getcomposer.org/download/](https://getcomposer.org/download/)

## [0.6.1] - 29-12-2019
- nginx version 1.17.7 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.4.1 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)

## [0.6.0] - 05-11-2019
- nginx version 1.17.5 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.3.11 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- composer version 1.9.1 [https://getcomposer.org/download/](https://getcomposer.org/download/)

## [0.5.9] - 09-08-2019
- debian to version buster - [https://hub.docker.com/_/debian/](https://hub.docker.com/_/debian/)
- nginx version 1.17.2 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.3.8 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- composer version 1.9.0 [https://getcomposer.org/download/](https://getcomposer.org/download/)

## [0.5.8] - 09-05-2019
- nginx version 1.15.12 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.3.5 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)

## [0.5.7] - 16-04-2019
- nginx version 1.15.11 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.3.4 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- composer version 1.8.5 [https://getcomposer.org/download/](https://getcomposer.org/download/)

## [0.5.6]- 12-03-2019
- php version 7.3.3 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- nginx version 1.15.9 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)

## [0.5.5]- 12-02-2019
- php version 7.3.2 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- composer version 1.8.4 [https://getcomposer.org/download/](https://getcomposer.org/download/)

## [0.5.4] - 24-01-2019
- nginx version 1.15.8 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.3.1 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- composer version 1.8.0 [https://getcomposer.org/download/](https://getcomposer.org/download/)

## [0.5.3] - 08-12-2018
- php version 7.3.0 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)

## [0.5.2] - 27-11-2018
### Update
- fix for [cannot open '/dev/tty': No such device or address](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=913614)

## [0.5.1] - 27-11-2018
- nginx version 1.15.7 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- add keyserver

## [0.5.0] - 27-11-2018
- nginx version 1.15.6 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.2.12 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- composer version 1.7.3 [https://getcomposer.org/download/](https://getcomposer.org/download/)
- add bcmath extension
- logo update

## [0.4.9] - 03-11-2018
- nginx to version 1.15.5 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.2.11 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)

## [0.4.8] - 01-10-2018
- nginx to version 1.15.4 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.2.10 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)

## [0.4.7] - 01-09-2018
- nginx to version 1.15.3 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.2.9 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- composer version 1.7.2 [https://getcomposer.org/download/](https://getcomposer.org/download/)

## [0.4.6] - 08-08-2018
- composer version 1.7.1 [https://getcomposer.org/download/](https://getcomposer.org/download/)

## [0.4.5] - 26-07-2018
### Update
- nginx to version 1.15.2 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.2.8 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)

## [0.4.4] - 10-07-2018
### Update
- Created PHP 7.2.x branch; Readme update

## [0.4.3] - 04-07-2018
### Update
- nginx to version 1.15.1 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)

## [0.4.2] - 01-07-2018
### Update
- add additional keyservers for retrieving nginx signing GPG key

## [0.4.1] - 26-06-2018
### Update
- php version 7.2.7 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)


## [0.4.0] - 12-06-2018
### Update
- nginx to version 1.15.0 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.2.6 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)

## [0.3.9] - 07-05-2018
- composer version 1.6.5 [https://getcomposer.org/download/](https://getcomposer.org/download/)

## [0.3.8] - 06-05-2018
- [php version 7.2.5 available](https://github.com/oerdnj/deb.sury.org/issues/858#issuecomment-386828748)

## [0.3.7] - 01-05-2018
- README update: PHP version correction; PHP v7.2.5 not currently available in the deb.sury.org package

## [0.3.6] - 26-04-2018
### Update
- nginx to version 1.13.12 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.2.5 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- composer version 1.6.4 [https://getcomposer.org/download/](https://getcomposer.org/download/)

## [0.3.5] - 08-04-2018
### Update
- nginx to version 1.13.11 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.2.4 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)

## [0.3.4] - 25-03-2018
### Update
- nginx to version 1.13.10 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- composer version 1.6.3 added [https://getcomposer.org/download/](https://getcomposer.org/download/)
- php version 7.2.3 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)

## [0.3.3] - 24-01-2018
### Update
- nginx to version 1.13.8 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)

## [0.3.2] - 23-12-2017
### Update
- nginx to version 1.13.7 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.2 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)

## [0.3.1] - 03-11-2017
### Update
- php version 7.1.11 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)

## [0.3.0] - 17-10-2017
### Update
- nginx to version 1.13.6 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.1.10 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)

## [0.2.9] - 05-09-2017
### Update
- nginx to version 1.13.5 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)
- php version 7.1.9 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)

## [0.2.8] - 09-08-2017
### Update
- nginx to version 1.13.4 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)

## [0.2.7] - 04-08-2017
### Update
- php version 7.1.8 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)

## [0.2.6] - 13-07-2017
### Update
- nginx to version 1.13.3 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES) Security: CVE-2017-7529

## [0.2.5] - 10-07-2017
### Update
- php version 7.1.7 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)

## [0.2.4] - 27-06-2017
### Update
- nginx to version 1.13.2 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)

## [0.2.3] - 23-06-2017
### Update
- upgrade base image to debian stretch

## [0.2.2] - 08-06-2017
### Update
- php version 7.1.6 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)

## [0.2.1] - 31-05-2017
### Update
- nginx to version 1.13.1 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)

## [0.2.0] - 12-05-2017
### Update
- php version 7.1.5 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)

## [0.1.9] - 26-04-2017
### Update
- nginx to version 1.13.0 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)

## [0.1.8] - 13-04-2017
### Update
- php version 7.1.4 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- nginx to version 1.11.13 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)

## [0.1.7] - 21-03-2017
### Update
- README.md update
- nginx to version 1.11.11 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)

## [0.1.6] - 15-03-2017
### Update
- php package switched to [https://deb.sury.org/](https://deb.sury.org/)
- Dockerfile updates
- License update
- php version 7.1.3 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- nginx to version 1.11.10 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)

## [0.1.5] - 15-03-2017
### Update
- php version 7.0.16 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- nginx to version 1.11.10 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)

## [0.1.4] - 14-12-2016
### Update
- php version 7.0.14 available - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- nginx to version 1.11.7 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)

## [0.1.3] - 20-11-2016
### Update
- php to version 7.0.13 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-7.php)
- nginx to version 1.11.6 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)

## [0.1.2] - 18-11-2016
### Update
- php to version 7.0.12
- nginx to version 1.11.5

## [0.1.1] - 21-09-2016
### Update
- php to version 7.0.11

## [0.1.0] - 17-09-2016
### Update
- nginx to version 1.11.4

## [0.0.0] - 28-08-2016
### Added
- .dockerignore file


================================================
FILE: Dockerfile
================================================
FROM debian:bullseye-slim

LABEL maintainer="Colin Wilson colin@wyveo.com"

# Let the container know that there is no tty
ENV DEBIAN_FRONTEND noninteractive
ENV NGINX_VERSION 1.25.2-1~bullseye
ENV php_conf /etc/php/8.2/fpm/php.ini
ENV fpm_conf /etc/php/8.2/fpm/pool.d/www.conf
ENV COMPOSER_VERSION 2.5.8

# Install Basic Requirements
RUN buildDeps='curl gcc make autoconf libc-dev zlib1g-dev pkg-config' \
    && set -x \
    && apt-get update \
    && apt-get install --no-install-recommends $buildDeps --no-install-suggests -q -y gnupg2 dirmngr wget apt-transport-https lsb-release ca-certificates \
    && \
    NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
          found=''; \
          for server in \
                  ha.pool.sks-keyservers.net \
                  hkp://keyserver.ubuntu.com:80 \
                  hkp://p80.pool.sks-keyservers.net:80 \
                  pgp.mit.edu \
          ; do \
                  echo "Fetching GPG key $NGINX_GPGKEY from $server"; \
                  apt-key adv --batch --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$NGINX_GPGKEY" && found=yes && break; \
          done; \
    test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
    echo "deb http://nginx.org/packages/mainline/debian/ bullseye nginx" >> /etc/apt/sources.list \
    && wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg \
    && echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list \
    && apt-get update \
    && apt-get install --no-install-recommends --no-install-suggests -q -y \
            apt-utils \
            nano \
            zip \
            unzip \
            python3-pip \
            python-setuptools \
            git \
            libmemcached-dev \
            libmemcached11 \
            libmagickwand-dev \
            nginx=${NGINX_VERSION} \
            php8.2-fpm \
            php8.2-cli \
            php8.2-bcmath \
            php8.2-dev \
            php8.2-common \
            php8.2-opcache \
            php8.2-readline \
            php8.2-mbstring \
            php8.2-curl \
            php8.2-gd \
            php8.2-imagick \
            php8.2-mysql \
            php8.2-zip \
            php8.2-pgsql \
            php8.2-intl \
            php8.2-xml \
            php-pear \
    && pecl -d php_suffix=8.2 install -o -f redis memcached \
    && mkdir -p /run/php \
    && pip install wheel \
    && pip install supervisor \
    && pip install git+https://github.com/coderanger/supervisor-stdout \
    && echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d \
    && rm -rf /etc/nginx/conf.d/default.conf \
    && sed -i -e "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g" ${php_conf} \
    && sed -i -e "s/memory_limit\s*=\s*.*/memory_limit = 256M/g" ${php_conf} \
    && sed -i -e "s/upload_max_filesize\s*=\s*2M/upload_max_filesize = 100M/g" ${php_conf} \
    && sed -i -e "s/post_max_size\s*=\s*8M/post_max_size = 100M/g" ${php_conf} \
    && sed -i -e "s/variables_order = \"GPCS\"/variables_order = \"EGPCS\"/g" ${php_conf} \
    && sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php/8.2/fpm/php-fpm.conf \
    && sed -i -e "s/;catch_workers_output\s*=\s*yes/catch_workers_output = yes/g" ${fpm_conf} \
    && sed -i -e "s/pm.max_children = 5/pm.max_children = 4/g" ${fpm_conf} \
    && sed -i -e "s/pm.start_servers = 2/pm.start_servers = 3/g" ${fpm_conf} \
    && sed -i -e "s/pm.min_spare_servers = 1/pm.min_spare_servers = 2/g" ${fpm_conf} \
    && sed -i -e "s/pm.max_spare_servers = 3/pm.max_spare_servers = 4/g" ${fpm_conf} \
    && sed -i -e "s/pm.max_requests = 500/pm.max_requests = 200/g" ${fpm_conf} \
    && sed -i -e "s/www-data/nginx/g" ${fpm_conf} \
    && sed -i -e "s/^;clear_env = no$/clear_env = no/" ${fpm_conf} \
    && echo "extension=redis.so" > /etc/php/8.2/mods-available/redis.ini \
    && echo "extension=memcached.so" > /etc/php/8.2/mods-available/memcached.ini \
    && echo "extension=imagick.so" > /etc/php/8.2/mods-available/imagick.ini \
    && ln -sf /etc/php/8.2/mods-available/redis.ini /etc/php/8.2/fpm/conf.d/20-redis.ini \
    && ln -sf /etc/php/8.2/mods-available/redis.ini /etc/php/8.2/cli/conf.d/20-redis.ini \
    && ln -sf /etc/php/8.2/mods-available/memcached.ini /etc/php/8.2/fpm/conf.d/20-memcached.ini \
    && ln -sf /etc/php/8.2/mods-available/memcached.ini /etc/php/8.2/cli/conf.d/20-memcached.ini \
    && ln -sf /etc/php/8.2/mods-available/imagick.ini /etc/php/8.2/fpm/conf.d/20-imagick.ini \
    && ln -sf /etc/php/8.2/mods-available/imagick.ini /etc/php/8.2/cli/conf.d/20-imagick.ini \
    # Install Composer
    && curl -o /tmp/composer-setup.php https://getcomposer.org/installer \
    && curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig \
    && php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }" \
    && php /tmp/composer-setup.php --no-ansi --install-dir=/usr/local/bin --filename=composer --version=${COMPOSER_VERSION} \
    && rm -rf /tmp/composer-setup.php \
    # Clean up
    && rm -rf /tmp/pear \
    && apt-get purge -y --auto-remove $buildDeps \
    && apt-get clean \
    && apt-get autoremove \
    && rm -rf /var/lib/apt/lists/*

# Supervisor config
COPY ./supervisord.conf /etc/supervisord.conf

# Override nginx's default config
COPY ./default.conf /etc/nginx/conf.d/default.conf

# Override default nginx welcome page
COPY html /usr/share/nginx/html

# Copy Scripts
COPY ./start.sh /start.sh

EXPOSE 80

CMD ["/start.sh"]


================================================
FILE: LICENSE
================================================

Copyright (c) 2022 wyveo.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


================================================
FILE: README.md
================================================
[![Docker Hub; wyveo/nginx-php-fpm](https://img.shields.io/badge/docker%20hub-wyveo%2Fnginx--php--fpm-blue.svg?&logo=docker&style=for-the-badge)](https://hub.docker.com/r/wyveo/nginx-php-fpm/) [![](https://badges.weareopensource.me/docker/pulls/wyveo/nginx-php-fpm?style=for-the-badge)](https://hub.docker.com/r/wyveo/nginx-php-fpm/) [![](https://img.shields.io/docker/image-size/wyveo/nginx-php-fpm/latest?style=for-the-badge)](https://hub.docker.com/r/wyveo/nginx-php-fpm/) [![nginx 1.25.2](https://img.shields.io/badge/nginx-1.25.2-brightgreen.svg?&logo=nginx&logoColor=white&style=for-the-badge)](https://nginx.org/en/CHANGES) [![php 8.2.9](https://img.shields.io/badge/php--fpm-8.2.9-blue.svg?&logo=php&logoColor=white&style=for-the-badge)](https://secure.php.net/releases/8_2_9.php) [![License MIT](https://img.shields.io/badge/license-MIT-blue.svg?&style=for-the-badge)](https://github.com/wyveo/nginx-php-fpm/blob/master/LICENSE)

## Introduction
This is a Dockerfile to build a debian based container image running nginx and php-fpm 8.2.x / 8.1.x / 8.0.x / 7.4.x / 7.3.x / 7.2.x / 7.1.x / 7.0.x & Composer.

### Versioning
| Docker Tag | GitHub Release | Nginx Version | PHP Version | Debian Version | Composer 
|------------|----------------|---------------|-------------|----------------|----------|
| latest     | master Branch  | 1.25.2        | 8.2.9       | bullseye       | 2.5.8    |
| php82      | php82 Branch   | 1.25.2        | 8.2.9       | bullseye       | 2.5.8    |
| php81      | php81 Branch   | 1.21.6        | 8.1.3       | bullseye       | 2.2.7    |
| php80      | php80 Branch   | 1.21.6        | 8.0.16      | buster         | 2.0.13   |
| php74      | php74 Branch   | 1.21.6        | 7.4.28      | buster         | 2.0.13   |
| php73      | php73 Branch   | 1.21.6        | 7.3.33      | buster         | 2.0.13   |
| php72      | php72 Branch   | 1.21.6        | 7.2.34      | buster         | 2.0.13   |
| php71      | php71 Branch   | 1.21.6        | 7.1.33      | buster         | 2.0.13   |
| php70      | php70 Branch   | 1.21.6        | 7.0.33      | buster         | 2.0.13   |

## Building from source
To build from source you need to clone the git repo and run docker build:
```
$ git clone https://github.com/wyveo/nginx-php-fpm.git
$ cd nginx-php-fpm
```

followed by
```
$ docker build -t nginx-php-fpm:php82 . # PHP 8.2.x
```


## Pulling from Docker Hub
```
$ docker pull wyveo/nginx-php-fpm:php82
```

## Running
To run the container:
```
$ sudo docker run -d wyveo/nginx-php-fpm:php82
```

Default web root:
```
/usr/share/nginx/html
```


================================================
FILE: default.conf
================================================
server {
    listen   80; ## listen for ipv4; this line is default and implied
    listen   [::]:80 default ipv6only=on; ## listen for ipv6

    root /usr/share/nginx/html;
    index index.php index.html index.htm;

    # Make site accessible from http://localhost/
    server_name _;

    # Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html
    sendfile off;

    # Security - Hide nginx version number in error pages and Server header
    server_tokens off;

    # Add stdout logging
    error_log /dev/stdout info;
    access_log /dev/stdout;

    # reduce the data that needs to be sent over network
    gzip on;
    gzip_min_length 10240;
    gzip_proxied expired no-cache no-store private auth;
    gzip_types text/plain text/css text/xml application/json text/javascript application/x-javascript application/xml;
    gzip_disable "MSIE [1-6]\.";

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to index.php
        try_files $uri $uri/ /index.php?$query_string $uri/index.html;
    }

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    # pass the PHP scripts to FastCGI server listening on socket
    #
    location ~ \.php$ {
        try_files $uri $uri/ /index.php?$query_string;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/run/php/php8.2-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
    }

        location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
                expires           5d;
        }

    # deny access to . files, for security
    #
    location ~ /\. {
            log_not_found off;
            deny all;
    }

}


================================================
FILE: html/index.php
================================================
<!DOCTYPE html>
<html lang="en">
<head>

  <!-- Basic Page Needs
  –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  <meta charset="utf-8">
  <title>Docker | wyveo/nginx-php-fpm</title>
  <meta name="description" content="">
  <meta name="author" content="">

  <!-- Mobile Specific Metas
  –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <!-- FONT
  –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  <link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">

  <!-- CSS
  –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  <link rel="stylesheet" href="css/normalize.min.css">
  <link rel="stylesheet" href="css/skeleton.min.css">

  <!-- Favicon
  –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  <link rel="icon" type="image/png" href="images/favicon.png">

</head>
<body>

  <!-- Primary Page Layout
  –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  <div class="container">
    <div class="row">
      <div class="one-half column" style="margin-top: 25%">
        <img height="45px" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbmFtZT0iTGF5ZXIgMSIgdmlld0JveD0iMCAwIDYyOS4yMiA2OTkuNSI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTM0OS4yNSAxOS43NWMtMTkuMDUtMTEtNTAuMjMtMTEtNjkuMjggMGwtMjMzLjgzIDEzNWMtMTkgMTEtMzQuNjQgMzgtMzQuNjQgNjB2MjcwYzAgMjIgMTUuNTkgNDkgMzQuNjQgNjBsMjMzLjg2IDEzNWMxOSAxMSA1MC4yMyAxMSA2OS4yOCAwbDIzMy44My0xMzVjMTktMTEgMzQuNjQtMzggMzQuNjQtNjB2LTI3MGMwLTIyLTE1LjU5LTQ5LTM0LjY0LTYweiIvPjxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzFmMWYxZiIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBzdHJva2Utd2lkdGg9IjIzIiBkPSJNMzQ5LjI1IDE5Ljc1Yy0xOS4wNS0xMS01MC4yMy0xMS02OS4yOCAwbC0yMzMuODMgMTM1Yy0xOSAxMS0zNC42NCAzOC0zNC42NCA2MHYyNzBjMCAyMiAxNS41OSA0OSAzNC42NCA2MGwyMzMuODYgMTM1YzE5IDExIDUwLjIzIDExIDY5LjI4IDBsMjMzLjgzLTEzNWMxOS0xMSAzNC42NC0zOCAzNC42NC02MHYtMjcwYzAtMjItMTUuNTktNDktMzQuNjQtNjB6Ii8+PHBhdGggZD0iTTE1Ni40MSAyNzIuNzJjLTIuOTQtMTYuMzItNy41MS0zNCAxNi0zNGgyMi41M2MyMi44NCAwIDI1Ljc4IDE3LjYzIDI2Ljc2IDI1Ljc5bDI0LjE1IDE0NC42aDJjMy45Mi0zNS4yNiAxOS4yNi0xMzMuNSAyMS4yMi0xNDQgMi4yOC0xNS42NyAzLjkyLTI2LjQ0IDI0LjgxLTI2LjQ0SDMzNWMyMC41NyAwIDIzLjUgMTggMjQuNDggMjYuNDQgMy4yNyAyNS40NiAxOCAxMjAuMTIgMjIuNTIgMTQ0LjI3aDJjMy41OS0zNC42IDE4LjI4LTEzNC40OCAxOS45MS0xNDQuNiAyLjYxLTE2IDMuOTItMjYuMTEgMjQuODEtMjYuMTFoMzJjMTYuMzIgMCAxNiAxNy42MyAxMy4wNSAzMi04LjE2IDM5LjE3LTMxLjY2IDEzOC43Mi0zNC45MiAxNTIuNDMtMy4yNiAxNi01Ljg4IDM3LjU0LTMzLjYyIDM3LjU0aC00MC41OGMtMTQuMzYgMC0yNi40My01Ljg4LTI4LjA2LTI0LjE2LTItMTctMTcuMzEtMTE1Ljg3LTIxLjg3LTE0MWgtMmMtNC4yNSAzNS45LTE3Ljk1IDEyMC4xMS0yMC44OSAxNDEuNjYtMi4yOSAxOC4yNy0xMy4wNiAyMy41LTI4LjA3IDIzLjVoLTQyLjA3Yy0yNC40OCAwLTI4LjcyLTE5LjU5LTMyLjMxLTMzLTMuOTItMTYuODUtMjguMzgtMTMxLjA5LTMyLjk3LTE1NC45MnoiLz48L3N2Zz4=">
        <h4>Congratulations!</h4>
        <p>You have successfully deployed a <strong>docker</strong> container running our <strong>NGINX</strong> with <strong>PHP-FPM 8.2.x</strong> image</p>
        <p><strong>NGINX: </strong>v<?php echo $_ENV['NGINX_VERSION'] ?><br><strong>PHP-FPM: </strong>v<?php echo phpversion(); ?><br><strong>LOADED CONFIG: </strong><?php echo php_ini_loaded_file(); ?><br><strong>WEB ROOT: </strong><?php echo $_ENV['DOCUMENT_ROOT'] ?><br><strong>HOSTNAME: </strong><?php echo gethostname(); ?><br></p>
          <em>Thank you for using <a style="text-decoration:none" href="https://wyveo.com" target="_blank">wyveo.com</a></em>
      </div>
    </div>
  </div>

<!-- End Document
  –––––––––––––––––––––––––––––––––––––––––––––––––– -->
</body>
</html>


================================================
FILE: start.sh
================================================
#!/bin/bash

# Update nginx to match worker_processes to no. of cpu's
procs=$(cat /proc/cpuinfo | grep processor | wc -l)
sed -i -e "s/worker_processes  1/worker_processes $procs/" /etc/nginx/nginx.conf

# Always chown webroot for better mounting
chown -Rf nginx:nginx /usr/share/nginx/html

# Start supervisord and services
/usr/local/bin/supervisord -n -c /etc/supervisord.conf


================================================
FILE: supervisord.conf
================================================
[unix_http_server]
file=/tmp/supervisor.sock   ; (the path to the socket file)
username=nobody
password=nobody

[supervisord]
logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB        ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10           ; (num of main logfile rotation backups;default 10)
loglevel=info                ; (log level;default info; others: debug,warn,trace)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false               ; (start in foreground if true;default false)
minfds=1024                  ; (min. avail startup file descriptors;default 1024)
minprocs=200                 ; (min. avail process descriptors;default 200)
user=root                    ; (default is current user, required if root)

; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL  for a unix socket

[program:php-fpm8]
command=/usr/sbin/php-fpm8.2 --nodaemonize --fpm-config=/etc/php/8.2/fpm/pool.d/www.conf
autostart=true
autorestart=true
priority=5
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

[program:nginx]
command=/usr/sbin/nginx -g "daemon off;"
autostart=true
autorestart=true
priority=10
stdout_events_enabled=true
stderr_events_enabled=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

[eventlistener:stdout]
command = supervisor_stdout
buffer_size = 100
events = PROCESS_LOG
result_handler = supervisor_stdout:event_handler
Download .txt
gitextract_pq_j5nhl/

├── .dockerignore
├── .github/
│   └── workflows/
│       ├── dockerhub-description.yaml
│       └── latest.yaml
├── .gitignore
├── CHANGELOG.md
├── Dockerfile
├── LICENSE
├── README.md
├── default.conf
├── html/
│   └── index.php
├── start.sh
└── supervisord.conf
Condensed preview — 12 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (34K chars).
[
  {
    "path": ".dockerignore",
    "chars": 47,
    "preview": ".git\n.gitignore\nLICENSE\nREADME.md\nCHANGELOG.md\n"
  },
  {
    "path": ".github/workflows/dockerhub-description.yaml",
    "chars": 566,
    "preview": "name: Update Docker Hub Description\non:\n  push:\n    branches:\n      - master\n    paths:\n      - README.md\n      - .githu"
  },
  {
    "path": ".github/workflows/latest.yaml",
    "chars": 391,
    "preview": "name: Publish PHP 8.2 image to Docker Hub\non:\n  push:\njobs:\n  build:\n    runs-on: ubuntu-20.04\n    steps:\n    - uses: ac"
  },
  {
    "path": ".gitignore",
    "chars": 278,
    "preview": "# Tmp files to always-ignore extensions\n*.diff\n*.err\n*.rej\n*.swo\n*~\n*.sass-cache\n*.orig\n\n# OS\n.DS_Store\nThumbs.db\n\n# Edi"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 13729,
    "preview": "## [0.7.4] - 24-09-2023\n### Update\n- nginx version 1.25.2 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES)\n-"
  },
  {
    "path": "Dockerfile",
    "chars": 5701,
    "preview": "FROM debian:bullseye-slim\n\nLABEL maintainer=\"Colin Wilson colin@wyveo.com\"\n\n# Let the container know that there is no tt"
  },
  {
    "path": "LICENSE",
    "chars": 1054,
    "preview": "\nCopyright (c) 2022 wyveo.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this soft"
  },
  {
    "path": "README.md",
    "chars": 2590,
    "preview": "[![Docker Hub; wyveo/nginx-php-fpm](https://img.shields.io/badge/docker%20hub-wyveo%2Fnginx--php--fpm-blue.svg?&logo=doc"
  },
  {
    "path": "default.conf",
    "chars": 1967,
    "preview": "server {\n    listen   80; ## listen for ipv4; this line is default and implied\n    listen   [::]:80 default ipv6only=on;"
  },
  {
    "path": "html/index.php",
    "chars": 3571,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\n  <!-- Basic Page Needs\n  –––––––––––––––––––––––––––––––––––––––––––––––––– --"
  },
  {
    "path": "start.sh",
    "chars": 380,
    "preview": "#!/bin/bash\n\n# Update nginx to match worker_processes to no. of cpu's\nprocs=$(cat /proc/cpuinfo | grep processor | wc -l"
  },
  {
    "path": "supervisord.conf",
    "chars": 1882,
    "preview": "[unix_http_server]\nfile=/tmp/supervisor.sock   ; (the path to the socket file)\nusername=nobody\npassword=nobody\n\n[supervi"
  }
]

About this extraction

This page contains the full source code of the wyveo/nginx-php-fpm GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 12 files (31.4 KB), approximately 11.4k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!