Skip to content

Commit

Permalink
Merge pull request #177 from devilbox/release-0.114
Browse files Browse the repository at this point in the history
Release 0.114
  • Loading branch information
cytopia authored Nov 6, 2020
2 parents e09e02a + 8864095 commit 3ca7d92
Show file tree
Hide file tree
Showing 44 changed files with 2,239 additions and 188 deletions.
1 change: 1 addition & 0 deletions .github/workflows/php-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ jobs:
- '7.3'
- '7.4'
- '8.0'
- '8.1'
steps:

# ------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/php-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ jobs:
- '7.3'
- '7.4'
- '8.0'
- '8.1'
refs:
- 'master'
- '0.113'
- '0.114'
steps:

# ------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ env:
- PHP=7.3
- PHP=7.4
- PHP=8.0
- PHP=8.1


###
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@
## Unreleased


## Release 0.114

#### Fixed
- Use latest PHP 8.0 image
- Disabled gd-jis: https://bugs.php.net/bug.php?id=73582

#### Added
- Add PHP 8.1
- PHP module mongodb is added to PHP 8.0

#### Changed
- Composer is updated to v2 (/usr/local/bin/composer)
- Composer is available as v1 and v2 (/usr/local/bin/composer-[12])


## Release 0.113

#### Fixed
Expand Down
104 changes: 104 additions & 0 deletions Dockerfiles/base/Dockerfile-8.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
FROM devilbox/php-fpm-8.1
MAINTAINER "cytopia" <[email protected]>


###
### Labels
###
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <[email protected]>"
LABEL "org.opencontainers.image.authors"="cytopia <[email protected]>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="8.1-base"
LABEL "org.opencontainers.image.title"="PHP-FPM 8.1-base"
LABEL "org.opencontainers.image.description"="PHP-FPM 8.1-base"


###
### Envs
###
ENV MY_USER="devilbox" \
MY_GROUP="devilbox" \
MY_UID="1000" \
MY_GID="1000" \
PHP_VERSION="8.1"


###
### User/Group
###
RUN set -eux \
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}


###
### Upgrade (install ps)
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/*


###
### Configure
###
RUN set -eux \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /usr/local/etc/php-fpm.d \
&& mkdir -p /var/lib/php/session \
&& mkdir -p /var/lib/php/wsdlcache \
&& chown -R devilbox:devilbox /var/lib/php/session \
&& chown -R devilbox:devilbox /var/lib/php/wsdlcache


###
### Copy files
###
COPY ./data/php-ini.d/php-8.1.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
COPY ./data/php-fpm.conf/php-fpm-8.1.conf /usr/local/etc/php-fpm.conf

COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
COPY ./data/docker-entrypoint.d /docker-entrypoint.d


###
### Verify
###
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.1' \
&& /usr/local/sbin/php-fpm --test \
\
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
\
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini


###
### Ports
###
EXPOSE 9000


###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
134 changes: 134 additions & 0 deletions Dockerfiles/base/data/php-fpm.conf/php-fpm-8.1.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
; ################################################################################
; ####
; #### The following settings can be overwritten by later includes
; ####
; ################################################################################


; ############################################################
; Timeouts
; ############################################################

[www]
; The timeout for serving a single request after which the worker process will be killed.
; This option should be used when the 'max_execution_time' ini option does not stop script
; execution for some reason.
request_terminate_timeout = 120s


; ############################################################
; Logging
; ############################################################

[global]
error_log = /proc/self/fd/2
log_level = notice

[www]
; if we send this to /proc/self/fd/1, it never appears
access.log = /proc/self/fd/2


; ############################################################
; Backlog configuration
; ############################################################

[www]
; A maximum of backlog incoming connections will be queued for processing.
; If a connection request arrives with the queue full the client may receive an error with an
; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission,
; the request may be ignored so that retries may succeed.

; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections
; are silently truncated
listen.backlog = 1024


; ############################################################
; Worker configuration
; ############################################################

[www]
; static - the number of child processes is fixed (pm.max_children).
;
; dynamic - the number of child processes is set dynamically based on the following directives:
; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers.
;
; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where
; pm.start_servers are started when the service is started.
pm = ondemand

; The maximum number of child processes to be created
pm.max_children = 50

; The number of child processes created on startup. Used only when pm is set to dynamic.
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2.
pm.start_servers = 4

; The desired minimum number of idle server processes.
pm.min_spare_servers = 2

; The desired maximum number of idle server processes.
pm.max_spare_servers = 6

; The number of requests each child process should execute before respawning.
; This can be useful to work around memory leaks in 3rd party libraries.
; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
; Default value: 0.
pm.max_requests = 500

; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand
pm.process_idle_timeout = 10s


; ############################################################
; Include
; ############################################################


[global]
include = /usr/local/etc/php-fpm.d/*.conf


; ################################################################################
; ####
; #### The following settings overwrite any includes again
; ####
; ################################################################################


; ############################################################
; Required for Dockerization
; ############################################################

[global]
daemonize = no

[www]
; Keep env variables set by docker
clear_env = no

; Redirect worker stdout and stderr into main error log. If not set, stdout and
; stderr will be redirected to /dev/null according to FastCGI specs.
; Note: on highloaded environement, this can cause some delay in the page
; process time (several ms).
; Default Value: no
catch_workers_output = yes


; ############################################################
; User and Group
; ############################################################

[www]
user = devilbox
group = devilbox


; ############################################################
; Networking
; ############################################################

[www]
; Ensure to listen here
listen = 9000
49 changes: 49 additions & 0 deletions Dockerfiles/base/data/php-ini.d/php-8.1.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
; ############################################################
; # Devilbox PHP defaults for 8.1-base
; ############################################################

; Each PHP flavour (base, mods, prod, work) might have its own php.ini.
; If none is present, the one from the previous flavour is inherited.


[PHP]

; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M


; Timeouts
max_execution_time = 120
max_input_time = 120


; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20


; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64


; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
log_errors = On
html_errors = Off


; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
2 changes: 1 addition & 1 deletion Dockerfiles/mods/Dockerfile-5.2
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \
&& docker-php-ext-configure gd --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-native-ttf \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/mods/Dockerfile-5.3
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ RUN set -eux \
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \
&& docker-php-ext-configure gd --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-native-ttf \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/mods/Dockerfile-5.4
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ RUN set -eux \
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \
&& docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-native-ttf \
# Installation
&& docker-php-ext-install gd \
&& true
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/mods/Dockerfile-5.5
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ RUN set -eux \
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \
&& docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-native-ttf \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/mods/Dockerfile-5.6
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ RUN set -eux \
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \
&& docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-native-ttf \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/mods/Dockerfile-7.0
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ RUN set -eux \
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \
&& docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-native-ttf \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
Expand Down
Loading

0 comments on commit 3ca7d92

Please sign in to comment.