Skip to content

Commit

Permalink
Update PHP to 7.4.8;
Browse files Browse the repository at this point in the history
Update nginx to 1.19.1;
Update composer to 1.10.9
  • Loading branch information
colinwilson committed Jul 17, 2020
1 parent dcf797c commit 850d7fa
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 24 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
26 changes: 14 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ LABEL maintainer="Colin Wilson [email protected]"

# 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' \
Expand Down Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[![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.

### 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:
Expand Down
6 changes: 3 additions & 3 deletions default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down
Binary file modified html/images/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion html/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<div class="container">
<div class="row">
<div class="one-half column" style="margin-top: 25%">
<img height="45px" src="data:image/svg+xml;base64,PHN2ZyBpZD0iYjg0MWFkOGYtNjg3Yy00NTBkLWJkZWYtYTMyMmFkOTAzZjYzIiBkYXRhLW5hbWU9IkxheWVyIDIiIHhtbG5zPSJodHRwOi8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tMy4yNiAxNi01Ljg4IDM3LjU0LTMzLjYyIDM3LjU0aC00MC41OGMtMTQuMzYgMC0yNi40My01Ljg4LTI4LjA2LTI0LjE2LTItMTctMTcuMzEtMTE1Ljg3LTIxLjg3LTE0MWgtMmMtNC4yNSAzNS45LTE3Ljk1IDEyMC4xMS0yMC44OSAxNDEuNjYtMi4yOSAxOC4yNy0xMy4wNiAyMy41LTI4LjA3IDIzLjVoLTQyLjA3Yy0yNC40OCAwLTI4LjcyLTE5LjU5LTMyLjMxLTMzLTMuOTItMTYuODUtMjguMzgtMTMxLjA5LTMyLjk3LTE1NC45MnoiLz48L3N2Zz4=">
<h4>Congratulations!</h4>
<p>You have successfully deployed a <strong>docker</strong> container running our <strong>NGINX</strong> with <strong>PHP-FPM 7.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>HOSTNAME: </strong><?php echo gethostname(); ?><br><strong>WEB ROOT: </strong><?php echo $_ENV['DOCUMENT_ROOT'] ?></p>
Expand Down
2 changes: 1 addition & 1 deletion start.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 850d7fa

Please sign in to comment.