Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 7.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /tmp
RUN \
# get the Nu scripts from the PHP image overlay
echo "Cloning Alpine overlay." && \
apk add git && git clone --branch v2.4.4 https://github.com/bfren/docker-php.git && \
apk add git && git clone --branch v2.4.5 https://github.com/bfren/docker-php.git && \
mkdir /overlay && \
mv docker-php/overlay/etc /overlay/

Expand All @@ -17,7 +17,7 @@ RUN \
# STAGE 1: create final image
#======================================================================================================================

FROM ghcr.io/bfren/nginx:nginx1.20-alpine3.15-6.5.5 AS final
FROM ghcr.io/bfren/nginx:nginx1.20-alpine3.15-6.5.6 AS final
COPY --from=php /overlay /

LABEL org.opencontainers.image.source="https://github.com/bfren/docker-nginx-php"
Expand Down
4 changes: 2 additions & 2 deletions 8.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /tmp
RUN \
# get the Nu scripts from the PHP image overlay
echo "Cloning Alpine overlay." && \
apk add git && git clone --branch v2.4.4 https://github.com/bfren/docker-php.git && \
apk add git && git clone --branch v2.4.5 https://github.com/bfren/docker-php.git && \
mkdir /overlay && \
mv docker-php/overlay/etc /overlay/

Expand All @@ -17,7 +17,7 @@ RUN \
# STAGE 1: create final image
#======================================================================================================================

FROM ghcr.io/bfren/nginx:nginx1.22-alpine3.16-6.5.5 AS final
FROM ghcr.io/bfren/nginx:nginx1.22-alpine3.16-6.5.6 AS final
COPY --from=php /overlay /

LABEL org.opencontainers.image.source="https://github.com/bfren/docker-nginx-php"
Expand Down
4 changes: 2 additions & 2 deletions 8.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /tmp
RUN \
# get the Nu scripts from the PHP image overlay
echo "Cloning Alpine overlay." && \
apk add git && git clone --branch v2.4.4 https://github.com/bfren/docker-php.git && \
apk add git && git clone --branch v2.4.5 https://github.com/bfren/docker-php.git && \
mkdir /overlay && \
mv docker-php/overlay/etc /overlay/

Expand All @@ -17,7 +17,7 @@ RUN \
# STAGE 1: create final image
#======================================================================================================================

FROM ghcr.io/bfren/nginx:nginx1.24-alpine3.19-6.5.5 AS final
FROM ghcr.io/bfren/nginx:nginx1.24-alpine3.19-6.5.6 AS final
COPY --from=php /overlay /

LABEL org.opencontainers.image.source="https://github.com/bfren/docker-nginx-php"
Expand Down
4 changes: 2 additions & 2 deletions 8.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /tmp
RUN \
# get the Nu scripts from the PHP image overlay
echo "Cloning Alpine overlay." && \
apk add git && git clone --branch v2.4.4 https://github.com/bfren/docker-php.git && \
apk add git && git clone --branch v2.4.5 https://github.com/bfren/docker-php.git && \
mkdir /overlay && \
mv docker-php/overlay/etc /overlay/

Expand All @@ -17,7 +17,7 @@ RUN \
# STAGE 1: create final image
#======================================================================================================================

FROM ghcr.io/bfren/nginx:nginx1.28-alpine3.22-6.5.5 AS final
FROM ghcr.io/bfren/nginx:nginx1.28-alpine3.22-6.5.6 AS final
COPY --from=php /overlay /

LABEL org.opencontainers.image.source="https://github.com/bfren/docker-nginx-php"
Expand Down
4 changes: 2 additions & 2 deletions 8.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /tmp
RUN \
# get the Nu scripts from the PHP image overlay
echo "Cloning Alpine overlay." && \
apk add git && git clone --branch v2.4.4 https://github.com/bfren/docker-php.git && \
apk add git && git clone --branch v2.4.5 https://github.com/bfren/docker-php.git && \
mkdir /overlay && \
mv docker-php/overlay/etc /overlay/

Expand All @@ -17,7 +17,7 @@ RUN \
# STAGE 1: create final image
#======================================================================================================================

FROM ghcr.io/bfren/nginx:nginx1.28-alpine3.22-6.5.5 AS final
FROM ghcr.io/bfren/nginx:nginx1.28-alpine3.22-6.5.6 AS final
COPY --from=php /overlay /

LABEL org.opencontainers.image.source="https://github.com/bfren/docker-nginx-php"
Expand Down
4 changes: 2 additions & 2 deletions 8.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /tmp
RUN \
# get the Nu scripts from the PHP image overlay
echo "Cloning Alpine overlay." && \
apk add git && git clone --branch v2.4.4 https://github.com/bfren/docker-php.git && \
apk add git && git clone --branch v2.4.5 https://github.com/bfren/docker-php.git && \
mkdir /overlay && \
mv docker-php/overlay/etc /overlay/

Expand All @@ -17,7 +17,7 @@ RUN \
# STAGE 1: create final image
#======================================================================================================================

FROM ghcr.io/bfren/nginx:nginx1.28-alpine3.22-6.5.5 AS final
FROM ghcr.io/bfren/nginx:nginx1.28-alpine3.22-6.5.6 AS final
COPY --from=php /overlay /

LABEL org.opencontainers.image.source="https://github.com/bfren/docker-nginx-php"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Nginx plus PHP (7.4, 8.0, 8.1, 8.2 and 8.3) - no SSL support etc, designed to be
* `php-fpm`
* `php-session`

Nginx is setup by default to run PHP in FPM mode. To override values in www.conf map a `www-conf.json` file to root - see `www-conf-sample.json`. Values in the php.ini file can be overridden in the same way - see [Docker PHP](https://github.com/bfren/docker-php) for more information and a sample file.
Nginx is setup by default to run PHP in FPM mode. To override values in www.conf map a `xx.json` file to `/etc/bf/php-fpm.d` - see `www-conf-sample.json`. Values in the php.ini file can be overridden in the same way - see [Docker PHP](https://github.com/bfren/docker-php) for more information and a sample file.

## Contents

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4.4
7.5.0
2 changes: 1 addition & 1 deletion VERSION_MINOR
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4
7.5
4 changes: 2 additions & 2 deletions generate-dockerfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -euo pipefail

docker pull bfren/alpine

BASE_VERSION="6.5.5"
PHP_BRANCH="v2.4.4"
BASE_VERSION="6.5.6"
PHP_BRANCH="v2.4.5"
PHP_VERSIONS="7.4 8.0 8.1 8.2 8.3 8.4"

for V in ${PHP_VERSIONS} ; do
Expand Down
8 changes: 4 additions & 4 deletions overlay/etc/bf/init.d/20-env.nu
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ bf env load

# Set environment variables
def main [] {
let ini_override = "/php-ini.json"
let fpm_override = "/www-conf.json"
bf env set PHP_INI_OVERRIDE $ini_override
bf env set PHP_FPM_OVERRIDE $fpm_override
let ini_override = $"(bf env ETC)/php.d"
let fpm_override = $"(bf env ETC)/php-fpm.d"
bf env set PHP_INI_OVERRIDE_D $ini_override
bf env set PHP_FPM_OVERRIDE_D $fpm_override

let fpm_d = $"(bf env PHP_DIR)/php-fpm.d"
bf env set PHP_FPM_D $fpm_d
Expand Down
14 changes: 7 additions & 7 deletions overlay/etc/bf/init.d/22-php-ini.nu
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ use bf
use bf-php
bf env load

# Download and setup php.ini
# Apply any overrides to php.ini
export def main [] {
# if there is an override file, use it - otherwise use defaults
let override_file = bf env PHP_INI_OVERRIDE
let override_values = if ($override_file | path exists) { bf fs read $override_file | from json }

# download php.ini file and apply override values
bf-php ini $override_values
# load any override files and apply them
let ini_override = bf env PHP_INI_OVERRIDE_D
if ($ini_override | path exists) { $"($ini_override)/*.json" | into glob | ls --full-paths $in | get name | sort | each {|x|
let override_values = bf fs read $x | from json
bf-php ini $override_values
} }
}
16 changes: 8 additions & 8 deletions overlay/etc/bf/init.d/23-www-conf.nu
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ use bf
use bf-php
bf env load

# Setup www.conf
# Apply any overrides to www.conf
export def main [] {
# set user / group to www
# PHP-FPM configuration file
let fpm_conf = bf env PHP_FPM_CONF
let www = "www"
bf-php ini insert_or_replace_values_in_file $fpm_conf {user: $www, group: $www}

# if there is an override file, use it
let override_file = bf env PHP_FPM_OVERRIDE
let override_values = if ($override_file | path exists) { bf fs read $override_file | from json }
bf-php ini insert_or_replace_values_in_file $fpm_conf $override_values
# load any override files and apply them
let fpm_override = bf env PHP_FPM_OVERRIDE_D
if ($fpm_override | path exists) { $"($fpm_override)/*.json" | into glob | ls --full-paths $in | get name | sort | each {|x|
let override_values = bf fs read $x | from json
bf-php ini insert_or_replace_values_in_file $fpm_conf $override_values
} }
}
File renamed without changes.
6 changes: 6 additions & 0 deletions overlay/etc/bf/php.d/00-php-ini.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"allow_url_fopen": "Off",
"disable_functions": "phpinfo",
"error_log": "",
"memory_limit": "256M"
}
7 changes: 7 additions & 0 deletions overlay/etc/bf/php.d/01-session.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"session.cookie_httponly": "1",
"session.cookie_secure": "1",
"session.gc_maxlifetime": "86400",
"session.name": "bf-nginx-php-sessid",
"session.use_strict_mode": "1"
}
4 changes: 4 additions & 0 deletions overlay/etc/bf/php.d/02-upload.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"post_max_size": "64M",
"upload_max_filesize": "64M"
}
5 changes: 5 additions & 0 deletions overlay/etc/bf/php.d/03-jit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"opcache.enable": "1",
"opcache.jit": "tracing",
"opcache.jit_buffer_size": "128M"
}
13 changes: 0 additions & 13 deletions overlay/php-ini.json

This file was deleted.

1 change: 1 addition & 0 deletions overlay/tmp/install
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def main [] {
let packages = [
$"($prefix)=($version)"
$"($prefix)-fpm=($version)"
$"($prefix)-opcache=($version)"
$"($prefix)-session=($version)"
]
bf pkg install $packages
Expand Down