From 850d7fa03f478786785158f6e69355c7163fc09e Mon Sep 17 00:00:00 2001 From: Colin Wilson Date: Sat, 18 Jul 2020 00:59:21 +0100 Subject: [PATCH] Update PHP to 7.4.8; Update nginx to 1.19.1; Update composer to 1.10.9 --- CHANGELOG.md | 5 +++++ Dockerfile | 26 ++++++++++++++------------ README.md | 14 +++++++------- default.conf | 6 +++--- html/images/favicon.png | Bin 1466 -> 659 bytes html/index.php | 2 +- start.sh | 2 +- 7 files changed, 31 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e910d32..d890132 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [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) diff --git a/Dockerfile b/Dockerfile index 17b90cd..1086935 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,10 +4,10 @@ LABEL maintainer="Colin Wilson colin@wyveo.com" # Let the container know that there is no tty ENV DEBIAN_FRONTEND noninteractive -ENV NGINX_VERSION 1.17.9-1~buster +ENV NGINX_VERSION 1.19.1-1~buster ENV php_conf /etc/php/7.4/fpm/php.ini ENV fpm_conf /etc/php/7.4/fpm/pool.d/www.conf -ENV COMPOSER_VERSION 1.9.3 +ENV COMPOSER_VERSION 1.10.9 # Install Basic Requirements RUN buildDeps='curl gcc make autoconf libc-dev zlib1g-dev pkg-config' \ @@ -88,17 +88,19 @@ RUN buildDeps='curl gcc make autoconf libc-dev zlib1g-dev pkg-config' \ && ln -sf /etc/php/7.4/mods-available/memcached.ini /etc/php/7.4/fpm/conf.d/20-memcached.ini \ && ln -sf /etc/php/7.4/mods-available/memcached.ini /etc/php/7.4/cli/conf.d/20-memcached.ini \ && ln -sf /etc/php/7.4/mods-available/imagick.ini /etc/php/7.4/fpm/conf.d/20-imagick.ini \ - && ln -sf /etc/php/7.4/mods-available/imagick.ini /etc/php/7.4/cli/conf.d/20-imagick.ini - -RUN 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 -RUN rm -rf /tmp/pear \ + && ln -sf /etc/php/7.4/mods-available/imagick.ini /etc/php/7.4/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 && rm -rf /var/lib/apt/lists/* + && apt-get clean \ + && apt-get autoremove \ + && rm -rf /var/lib/apt/lists/* # Supervisor config ADD ./supervisord.conf /etc/supervisord.conf diff --git a/README.md b/README.md index e5f8b3c..e658ef6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![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://img.shields.io/microbadger/image-size/wyveo/nginx-php-fpm/latest.svg?&style=for-the-badge)](https://microbadger.com/images/wyveo/nginx-php-fpm) [![](https://img.shields.io/microbadger/layers/wyveo/nginx-php-fpm/latest.svg?&style=for-the-badge)](https://microbadger.com/images/wyveo/nginx-php-fpm) [![nginx 1.17.9](https://img.shields.io/badge/nginx-1.17.9-brightgreen.svg?&logo=nginx&logoColor=white&style=for-the-badge)](https://nginx.org/en/CHANGES) [![php 7.4.3](https://img.shields.io/badge/php--fpm-7.4.3-blue.svg?&logo=php&logoColor=white&style=for-the-badge)](https://secure.php.net/releases/7_4_3.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) +[![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://img.shields.io/microbadger/image-size/wyveo/nginx-php-fpm/latest.svg?&style=for-the-badge)](https://microbadger.com/images/wyveo/nginx-php-fpm) [![](https://img.shields.io/microbadger/layers/wyveo/nginx-php-fpm/latest.svg?&style=for-the-badge)](https://microbadger.com/images/wyveo/nginx-php-fpm) [![nginx 1.19.1](https://img.shields.io/badge/nginx-1.19.1-brightgreen.svg?&logo=nginx&logoColor=white&style=for-the-badge)](https://nginx.org/en/CHANGES) [![php 7.4.8](https://img.shields.io/badge/php--fpm-7.4.8-blue.svg?&logo=php&logoColor=white&style=for-the-badge)](https://secure.php.net/releases/7_4_8.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 7.4.x / 7.3.x / 7.2.x / 7.1.x / 7.0.x & Composer. @@ -6,12 +6,12 @@ This is a Dockerfile to build a debian based container image running nginx and p ### Versioning | Docker Tag | GitHub Release | Nginx Version | PHP Version | Debian Version | |-----|-------|-----|--------|--------| -| latest | master Branch |1.17.9 | 7.4.3 | buster | -| php74 | php74 Branch |1.17.9 | 7.4.3 | buster | -| php73 | php73 Branch |1.17.9 | 7.3.15 | buster | -| php72 | php72 Branch |1.17.9 | 7.2.28 | buster | -| php71 | php71 Branch |1.17.9 | 7.1.33 | buster | -| php70 | php70 Branch |1.17.9 | 7.0.33 | buster | +| latest | master Branch |1.19.1 | 7.4.8 | buster | +| php74 | php74 Branch |1.19.1 | 7.4.8 | buster | +| php73 | php73 Branch |1.19.1 | 7.3.20 | buster | +| php72 | php72 Branch |1.19.1 | 7.2.32 | buster | +| php71 | php71 Branch |1.19.1 | 7.1.33 | buster | +| php70 | php70 Branch |1.19.1 | 7.0.33 | buster | ## Building from source To build from source you need to clone the git repo and run docker build: diff --git a/default.conf b/default.conf index 2871e38..ec52cfd 100644 --- a/default.conf +++ b/default.conf @@ -27,8 +27,8 @@ server { location / { # First attempt to serve request as file, then - # as directory, then fall back to index.html - try_files $uri $uri/ =404; + # 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 @@ -41,7 +41,7 @@ server { # pass the PHP scripts to FastCGI server listening on socket # location ~ \.php$ { - try_files $uri =404; + try_files $uri $uri/ /index.php?$query_string; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/run/php/php7.4-fpm.sock; fastcgi_index index.php; diff --git a/html/images/favicon.png b/html/images/favicon.png index 00160790ef16110d9b72dab3c7b780ae59959d30..9b9c0b2ba5faf281509cf7d9c496005a248bfd5c 100644 GIT binary patch delta 590 zcmdnRJ(+caBnJxv1H;x|=C39y3Qu&@u4iCM@^*J&_}|`tWooXtI|x@*1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XwXs=w4BOVGMC=0TzgBW@ zsPyhoc|eT?v}n+VhBl$$tytt+JbIXjogu?liysV?UL06{^o%ZOEeh44;VoEXHy-_- zi1rZC0rK&X;@V|(&uLxTF)KVwm<_jM&_nb%5&MCBahez%UU=%l%H1c{Z0K6A?QE!o z=iGru4-rvl@)G&{C)ww{Hs_(bmESd@J6i?YzZe}IopyHCNqC*@beSUlpS3k zbLN74$yA1GOAD2pOtoxrF%qjhZdXQ9T3S+u%k8O3Ebw|fDCu&MsK?_iVAcD4o0@#S zrcFLyJuB7H?DdU3-eyaxax?sFY=C^TlH>OJ>gS6#dfZL?G*@fm{D~994J{kf6WIB4 z6B6d-a}urZ)Xav)CTKq<(Drph$pvsS$wpQ>U?j%|KCn8z*e635sTkLFt5}(&?DC}_ zxjZg{9Jw@i&PN~e_wPS=V6~}-hjg3Ge?ERP%x5rWOyAYM^Q-0RWtDes{d$|=a^pj_*GaFdc^=t3aYfFJn+rAf zXRU1>DBr8t#g=()GC+6jyj!1iXXn8!WYd_M)@x`=sDpQR`E0v;FU5$mR zrlnFPL>+*;Z}cSRHD*jxDm77NqlpGw32zFpyCIW4uForGsaa2(;>h(wAEZEJ`Zz>x zwor7fjRIq?IJRoz!k!AnYklM@NCB=;B+BE9g?w@2*1MA+GG$z!a&sL8kix>Yj)JE! zRWUBLq)Y}3<~0=DKF3l`udy0A2F*IN&RXr@{C6=N5h5_?Cx5#xP^ZzdVFerdJ6+K%f(k%}DbTLMRSo|Fz@R&( diff --git a/html/index.php b/html/index.php index adb0700..fc29499 100644 --- a/html/index.php +++ b/html/index.php @@ -34,7 +34,7 @@
- +

Congratulations!

You have successfully deployed a docker container running our NGINX with PHP-FPM 7.x image

NGINX: v
PHP-FPM: v
HOSTNAME:
WEB ROOT:

diff --git a/start.sh b/start.sh index 92e25b1..df9bf94 100755 --- a/start.sh +++ b/start.sh @@ -1,7 +1,7 @@ #!/bin/bash # Update nginx to match worker_processes to no. of cpu's -procs=$(cat /proc/cpuinfo |grep processor | wc -l) +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