Skip to content

Commit

Permalink
Merge pull request #4 from digiBlink/1.0.2
Browse files Browse the repository at this point in the history
updraded PHP to 7.4.26
  • Loading branch information
zxpower authored Dec 6, 2021
2 parents 2268bd0 + 9c89462 commit aa950da
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 39 deletions.
58 changes: 28 additions & 30 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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/

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions files/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;
Expand All @@ -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
Expand All @@ -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 ;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit aa950da

Please sign in to comment.