From 9c8946222926061c9cf86a6da185c990c6170463 Mon Sep 17 00:00:00 2001 From: Reinholds Zviedris Date: Mon, 6 Dec 2021 11:11:45 +0200 Subject: [PATCH] updraded PHP and packages --- Dockerfile | 58 +++++++++++++++++++++++++-------------------------- README.md | 8 +++---- files/php.ini | 10 ++++----- 3 files changed, 37 insertions(+), 39 deletions(-) diff --git a/Dockerfile b/Dockerfile index b3d63eb..2a33ad4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.13 +FROM alpine:3.14 # dependencies required for running "phpize" # these get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) @@ -54,37 +54,35 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie" ENV GPG_KEYS 42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312 -ENV PHP_VERSION 7.4.18 -ENV PHP_URL="https://www.php.net/distributions/php-7.4.18.tar.xz" PHP_ASC_URL="https://www.php.net/distributions/php-7.4.18.tar.xz.asc" -ENV PHP_SHA256="ab97f22b128d21dcbc009b50a37aaea0051b2721cbcd122d9e00e6ffc3c4b7e1" +ENV PHP_VERSION 7.4.26 +ENV PHP_URL="https://www.php.net/distributions/php-7.4.26.tar.xz" PHP_ASC_URL="https://www.php.net/distributions/php-7.4.26.tar.xz.asc" +ENV PHP_SHA256="e305b3aafdc85fa73a81c53d3ce30578bc94d1633ec376add193a1e85e0f0ef8" RUN set -eux; \ - \ - apk add --no-cache --virtual .fetch-deps \ - gnupg \ - ; \ - \ - mkdir -p /usr/src; \ - cd /usr/src; \ - \ - curl -fsSL -o php.tar.xz "$PHP_URL"; \ - \ - if [ -n "$PHP_SHA256" ]; then \ - echo "$PHP_SHA256 *php.tar.xz" | sha256sum -c -; \ - fi; \ - \ - if [ -n "$PHP_ASC_URL" ]; then \ - curl -fsSL -o php.tar.xz.asc "$PHP_ASC_URL"; \ - export GNUPGHOME="$(mktemp -d)"; \ - for key in $GPG_KEYS; do \ - gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ - done; \ - gpg --batch --verify php.tar.xz.asc php.tar.xz; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME"; \ - fi; \ - \ - apk del --no-network .fetch-deps + \ + apk add --no-cache --virtual .fetch-deps gnupg; \ + \ + mkdir -p /usr/src; \ + cd /usr/src; \ + \ + curl -fsSL -o php.tar.xz "$PHP_URL"; \ + \ + if [ -n "$PHP_SHA256" ]; then \ + echo "$PHP_SHA256 *php.tar.xz" | sha256sum -c -; \ + fi; \ + \ + if [ -n "$PHP_ASC_URL" ]; then \ + curl -fsSL -o php.tar.xz.asc "$PHP_ASC_URL"; \ + export GNUPGHOME="$(mktemp -d)"; \ + for key in $GPG_KEYS; do \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ + done; \ + gpg --batch --verify php.tar.xz.asc php.tar.xz; \ + gpgconf --kill all; \ + rm -rf "$GNUPGHOME"; \ + fi; \ + \ + apk del --no-network .fetch-deps COPY files/docker-php-source /usr/local/bin/ diff --git a/README.md b/README.md index 5acd78c..76b0800 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ Maintained by [digiBlink](https://digiblink.eu) - [docker hub link](https://hub. Container with: -* Alpine Linux 3.13 -* nginx 1.18.0-r13 -* PHP-FPM 7.4.18 (all necessary extensions to be ready for Wordpress deployment) -* WP-CLI 2.4.0 +* Alpine Linux 3.14 +* nginx 1.20.2-r0 +* PHP-FPM 7.4.26 (all necessary extensions to be ready for Wordpress deployment) +* WP-CLI 2.5.0 * git, bash ## Usage diff --git a/files/php.ini b/files/php.ini index 68e6fc6..5432e49 100644 --- a/files/php.ini +++ b/files/php.ini @@ -376,7 +376,7 @@ ;; threat in any way, but it makes it possible to determine whether you use PHP ;; on your server or not. ;; http://php.net/expose-php -;expose_php = On +expose_php = Off ; ;;;;;;;;;;;;;;;;;;;; ;; Resource Limits ; @@ -385,7 +385,7 @@ ;; Maximum execution time of each script, in seconds ;; http://php.net/max-execution-time ;; Note: This directive is hardcoded to 0 for the CLI SAPI -;max_execution_time = 30 +max_execution_time = 60 ; ;; Maximum amount of time each script may spend parsing request data. It's a good ;; idea to limit this time on productions servers in order to eliminate unexpectedly @@ -406,7 +406,7 @@ ; ;; Maximum amount of memory a script may consume ;; http://php.net/memory-limit -;memory_limit = 128M +memory_limit = 128M ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Error handling and logging ; @@ -691,7 +691,7 @@ ;; Its value may be 0 to disable the limit. It is ignored if POST data reading ;; is disabled through enable_post_data_reading. ;; http://php.net/post-max-size -;post_max_size = 8M +post_max_size = 64M ; ;; Automatically add files before PHP document. ;; http://php.net/auto-prepend-file @@ -843,7 +843,7 @@ ; ;; Maximum allowed size for uploaded files. ;; http://php.net/upload-max-filesize -;upload_max_filesize = 2M +upload_max_filesize = 32M ; ;; Maximum number of files that can be uploaded via a single request ;max_file_uploads = 20