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
159 changes: 159 additions & 0 deletions .github/workflows/v8.4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
---
name: v8.4

"on":
push:
branches:
- master
paths:
- v8.4/*
- .github/workflows/v8.4.yml
pull_request:
branches:
- master
paths:
- v8.4/*
- .github/workflows/v8.4.yml
workflow_dispatch:

jobs:
docker:
runs-on: ubuntu-latest

steps:
- name: Checkout source
id: source
uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
images: |
webhippie/php-cli
quay.io/webhippie/php-cli
ghcr.io/dockhippie/php-cli
labels: |
org.opencontainers.image.vendor=Webhippie
maintainer=Thomas Boerger <thomas@webhippie.de>

- name: Setup QEMU
id: qemu
uses: docker/setup-qemu-action@v3

- name: Setup Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Hub login
id: login1
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Quay login
id: login2
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}

- name: Ghcr login
id: login3
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build amd64
id: amd64
uses: docker/build-push-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
context: v8.4/
provenance: false
file: v8.4/Dockerfile.amd64
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.meta.outputs.labels }}
tags: |
webhippie/php-cli:8.4-amd64
quay.io/webhippie/php-cli:8.4-amd64
ghcr.io/dockhippie/php-cli:8.4-amd64

- name: Build arm64
id: arm64
uses: docker/build-push-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
context: v8.4/
provenance: false
file: v8.4/Dockerfile.arm64
platforms: linux/arm64
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.meta.outputs.labels }}
tags: |
webhippie/php-cli:8.4-arm64
quay.io/webhippie/php-cli:8.4-arm64
ghcr.io/dockhippie/php-cli:8.4-arm64

- name: Build arm
id: arm
uses: docker/build-push-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
context: v8.4/
provenance: false
file: v8.4/Dockerfile.arm
platforms: linux/arm/v6
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.meta.outputs.labels }}
tags: |
webhippie/php-cli:8.4-arm
quay.io/webhippie/php-cli:8.4-arm
ghcr.io/dockhippie/php-cli:8.4-arm

- name: Hub manifest
id: manifest1
uses: actionhippie/manifest@v1
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
platforms: linux/amd64,linux/arm64,linux/arm/v6
template: webhippie/php-cli:8.4-ARCH
target: webhippie/php-cli:8.4
ignore_missing: true

- name: Quay manifest
id: manifest2
uses: actionhippie/manifest@v1
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
platforms: linux/amd64,linux/arm64,linux/arm/v6
template: quay.io/webhippie/php-cli:8.4-ARCH
target: quay.io/webhippie/php-cli:8.4
ignore_missing: true

- name: Ghcr manifest
id: manifest3
uses: actionhippie/manifest@v1
if: github.event_name != 'pull_request'
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
platforms: linux/amd64,linux/arm64,linux/arm/v6
template: ghcr.io/dockhippie/php-cli:8.4-ARCH
target: ghcr.io/dockhippie/php-cli:8.4
ignore_missing: true

...
2 changes: 1 addition & 1 deletion latest/Dockerfile.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ghcr.io/dockhippie/alpine:latest-amd64@sha256:d272886ae1ebdd406578fd5bb3b05
WORKDIR /srv/www
CMD ["/usr/bin/container"]

ENV PHP_PACKAGE_VERSION=83
ENV PHP_PACKAGE_VERSION=84

RUN apk update && \
apk upgrade && \
Expand Down
2 changes: 1 addition & 1 deletion latest/Dockerfile.arm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ghcr.io/dockhippie/alpine:latest-arm@sha256:de9ee232aec6a8ed575b66cb77b02e4
WORKDIR /srv/www
CMD ["/usr/bin/container"]

ENV PHP_PACKAGE_VERSION=83
ENV PHP_PACKAGE_VERSION=84

RUN apk update && \
apk upgrade && \
Expand Down
2 changes: 1 addition & 1 deletion latest/Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ghcr.io/dockhippie/alpine:latest-arm64@sha256:f8160544a697b291e7399c6563046
WORKDIR /srv/www
CMD ["/usr/bin/container"]

ENV PHP_PACKAGE_VERSION=83
ENV PHP_PACKAGE_VERSION=84

RUN apk update && \
apk upgrade && \
Expand Down
2 changes: 1 addition & 1 deletion latest/overlay/etc/container.d/05-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
if [[ "${PHP_SKIP_TEMPLATES}" != "true" ]]; then
echo "> writing fpm config"
gomplate -V \
-o /etc/php83/php-fpm.conf \
-o /etc/php84/php-fpm.conf \
-f /etc/templates/php-fpm.conf.tmpl

if [[ $? -ne 0 ]]; then
Expand Down
14 changes: 7 additions & 7 deletions latest/overlay/etc/entrypoint.d/10-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if [[ "${PHP_SKIP_TEMPLATES}" != "true" ]]; then
gomplate \
-o /etc/php83/php.ini \
-o /etc/php84/php.ini \
-f /etc/templates/php.ini.tmpl || exit 1

if [[ $? -ne 0 ]]; then
Expand All @@ -11,20 +11,20 @@ if [[ "${PHP_SKIP_TEMPLATES}" != "true" ]]; then
fi
fi

for TEMPLATE in $(find /etc/php83/custom.d -mindepth 1 -type d); do
for TEMPLATE in $(find /etc/php84/custom.d -mindepth 1 -type d); do
RELATIVENAME=${TEMPLATE//\/etc\/php8\/custom.d\//}

if [ ! -d "/etc/php83/conf.d/${RELATIVENAME}" ]; then
mkdir "/etc/php83/conf.d/${RELATIVENAME}"
if [ ! -d "/etc/php84/conf.d/${RELATIVENAME}" ]; then
mkdir "/etc/php84/conf.d/${RELATIVENAME}"
fi
done

for TEMAPLTE in $(find /etc/php83/custom.d -mindepth 1 -type f); do
for TEMAPLTE in $(find /etc/php84/custom.d -mindepth 1 -type f); do
RELATIVENAME=${TEMPLATE//\/etc\/php8\/custom.d\//}

ln -sf \
"/etc/php83/conf.d/${RELATIVENAME}" \
"/etc/php83/custom.d/${RELATIVENAME}"
"/etc/php84/conf.d/${RELATIVENAME}" \
"/etc/php84/custom.d/${RELATIVENAME}"
done

true
File renamed without changes.
6 changes: 3 additions & 3 deletions latest/overlay/etc/templates/php.ini.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ default_charset = "UTF-8"
;input_encoding =
;output_encoding =

;include_path = ".:/php83/includes"
;include_path = ".:/php84/includes"

doc_root =
user_dir =

extension_dir = "/usr/lib/php83/modules"
extension_dir = "/usr/lib/php84/modules"
;sys_temp_dir = "/tmp"
enable_dl = {{ getenv "PHP_ENABLE_DL" }}

Expand Down Expand Up @@ -241,7 +241,7 @@ pgsql.log_notice = 0
bcmath.scale = 0

[browscap]
browscap = /etc/php83/browscap.ini
browscap = /etc/php84/browscap.ini

[Session]
session.save_handler = files
Expand Down
2 changes: 1 addition & 1 deletion latest/overlay/usr/bin/container
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ done

pushd ${PHP_WEBROOT} >/dev/null
echo "> starting php service"
exec php-fpm8
exec php-fpm84
popd >/dev/null
22 changes: 22 additions & 0 deletions v8.4/Dockerfile.amd64
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ghcr.io/dockhippie/alpine:latest-amd64@sha256:d272886ae1ebdd406578fd5bb3b050e770a529f33c98ba20bf5f664118fe352f

WORKDIR /srv/www
CMD ["/usr/bin/container"]

ENV PHP_PACKAGE_VERSION=84

RUN apk update && \
apk upgrade && \
apk add php${PHP_PACKAGE_VERSION} php${PHP_PACKAGE_VERSION}-phpdbg php${PHP_PACKAGE_VERSION}-fpm php${PHP_PACKAGE_VERSION}-ctype php${PHP_PACKAGE_VERSION}-curl php${PHP_PACKAGE_VERSION}-dom php${PHP_PACKAGE_VERSION}-gd php${PHP_PACKAGE_VERSION}-iconv php${PHP_PACKAGE_VERSION}-intl php${PHP_PACKAGE_VERSION}-mysqli php${PHP_PACKAGE_VERSION}-mysqlnd php${PHP_PACKAGE_VERSION}-openssl php${PHP_PACKAGE_VERSION}-opcache php${PHP_PACKAGE_VERSION}-pdo php${PHP_PACKAGE_VERSION}-pdo_mysql php${PHP_PACKAGE_VERSION}-pdo_pgsql php${PHP_PACKAGE_VERSION}-pdo_sqlite php${PHP_PACKAGE_VERSION}-pear php${PHP_PACKAGE_VERSION}-pgsql php${PHP_PACKAGE_VERSION}-phar php${PHP_PACKAGE_VERSION}-sqlite3 php${PHP_PACKAGE_VERSION}-xml php${PHP_PACKAGE_VERSION}-zip php${PHP_PACKAGE_VERSION}-mbstring php${PHP_PACKAGE_VERSION}-simplexml php${PHP_PACKAGE_VERSION}-tokenizer php${PHP_PACKAGE_VERSION}-xmlwriter php${PHP_PACKAGE_VERSION}-fileinfo php${PHP_PACKAGE_VERSION}-soap php${PHP_PACKAGE_VERSION}-pecl-apcu php${PHP_PACKAGE_VERSION}-pecl-redis php${PHP_PACKAGE_VERSION}-pecl-memcached git && \
ln -sf /usr/bin/php${PHP_PACKAGE_VERSION} /usr/bin/php && \
groupadd -g 1000 php && \
useradd -u 1000 -d /srv/www -g php -s /bin/bash -M php && \
rm -rf /var/cache/apk/* /etc/php${PHP_PACKAGE_VERSION}/*

VOLUME ["/etc/php${PHP_PACKAGE_VERSION}/custom.d"]
EXPOSE 9000

COPY ./overlay /

RUN curl -sSLo - https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \
curl -sSLo /etc/php${PHP_PACKAGE_VERSION}/browscap.ini http://browscap.org/stream\?q=PHP_BrowsCapINI
22 changes: 22 additions & 0 deletions v8.4/Dockerfile.arm
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ghcr.io/dockhippie/alpine:latest-arm@sha256:de9ee232aec6a8ed575b66cb77b02e448314acc87cea68cb537ee31a3c118e53

WORKDIR /srv/www
CMD ["/usr/bin/container"]

ENV PHP_PACKAGE_VERSION=84

RUN apk update && \
apk upgrade && \
apk add php${PHP_PACKAGE_VERSION} php${PHP_PACKAGE_VERSION}-phpdbg php${PHP_PACKAGE_VERSION}-fpm php${PHP_PACKAGE_VERSION}-ctype php${PHP_PACKAGE_VERSION}-curl php${PHP_PACKAGE_VERSION}-dom php${PHP_PACKAGE_VERSION}-gd php${PHP_PACKAGE_VERSION}-iconv php${PHP_PACKAGE_VERSION}-intl php${PHP_PACKAGE_VERSION}-mysqli php${PHP_PACKAGE_VERSION}-mysqlnd php${PHP_PACKAGE_VERSION}-openssl php${PHP_PACKAGE_VERSION}-opcache php${PHP_PACKAGE_VERSION}-pdo php${PHP_PACKAGE_VERSION}-pdo_mysql php${PHP_PACKAGE_VERSION}-pdo_pgsql php${PHP_PACKAGE_VERSION}-pdo_sqlite php${PHP_PACKAGE_VERSION}-pear php${PHP_PACKAGE_VERSION}-pgsql php${PHP_PACKAGE_VERSION}-phar php${PHP_PACKAGE_VERSION}-sqlite3 php${PHP_PACKAGE_VERSION}-xml php${PHP_PACKAGE_VERSION}-zip php${PHP_PACKAGE_VERSION}-mbstring php${PHP_PACKAGE_VERSION}-simplexml php${PHP_PACKAGE_VERSION}-tokenizer php${PHP_PACKAGE_VERSION}-xmlwriter php${PHP_PACKAGE_VERSION}-fileinfo php${PHP_PACKAGE_VERSION}-soap php${PHP_PACKAGE_VERSION}-pecl-apcu php${PHP_PACKAGE_VERSION}-pecl-redis php${PHP_PACKAGE_VERSION}-pecl-memcached git && \
ln -sf /usr/bin/php${PHP_PACKAGE_VERSION} /usr/bin/php && \
groupadd -g 1000 php && \
useradd -u 1000 -d /srv/www -g php -s /bin/bash -M php && \
rm -rf /var/cache/apk/* /etc/php${PHP_PACKAGE_VERSION}/*

VOLUME ["/etc/php${PHP_PACKAGE_VERSION}/custom.d"]
EXPOSE 9000

COPY ./overlay /

RUN curl -sSLo - https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \
curl -sSLo /etc/php${PHP_PACKAGE_VERSION}/browscap.ini http://browscap.org/stream\?q=PHP_BrowsCapINI
22 changes: 22 additions & 0 deletions v8.4/Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ghcr.io/dockhippie/alpine:latest-arm64@sha256:f8160544a697b291e7399c65630465247bd673a218d90a9edae343965bc43c51

WORKDIR /srv/www
CMD ["/usr/bin/container"]

ENV PHP_PACKAGE_VERSION=84

RUN apk update && \
apk upgrade && \
apk add php${PHP_PACKAGE_VERSION} php${PHP_PACKAGE_VERSION}-phpdbg php${PHP_PACKAGE_VERSION}-fpm php${PHP_PACKAGE_VERSION}-ctype php${PHP_PACKAGE_VERSION}-curl php${PHP_PACKAGE_VERSION}-dom php${PHP_PACKAGE_VERSION}-gd php${PHP_PACKAGE_VERSION}-iconv php${PHP_PACKAGE_VERSION}-intl php${PHP_PACKAGE_VERSION}-mysqli php${PHP_PACKAGE_VERSION}-mysqlnd php${PHP_PACKAGE_VERSION}-openssl php${PHP_PACKAGE_VERSION}-opcache php${PHP_PACKAGE_VERSION}-pdo php${PHP_PACKAGE_VERSION}-pdo_mysql php${PHP_PACKAGE_VERSION}-pdo_pgsql php${PHP_PACKAGE_VERSION}-pdo_sqlite php${PHP_PACKAGE_VERSION}-pear php${PHP_PACKAGE_VERSION}-pgsql php${PHP_PACKAGE_VERSION}-phar php${PHP_PACKAGE_VERSION}-sqlite3 php${PHP_PACKAGE_VERSION}-xml php${PHP_PACKAGE_VERSION}-zip php${PHP_PACKAGE_VERSION}-mbstring php${PHP_PACKAGE_VERSION}-simplexml php${PHP_PACKAGE_VERSION}-tokenizer php${PHP_PACKAGE_VERSION}-xmlwriter php${PHP_PACKAGE_VERSION}-fileinfo php${PHP_PACKAGE_VERSION}-soap php${PHP_PACKAGE_VERSION}-pecl-apcu php${PHP_PACKAGE_VERSION}-pecl-redis php${PHP_PACKAGE_VERSION}-pecl-memcached git && \
ln -sf /usr/bin/php${PHP_PACKAGE_VERSION} /usr/bin/php && \
groupadd -g 1000 php && \
useradd -u 1000 -d /srv/www -g php -s /bin/bash -M php && \
rm -rf /var/cache/apk/* /etc/php${PHP_PACKAGE_VERSION}/*

VOLUME ["/etc/php${PHP_PACKAGE_VERSION}/custom.d"]
EXPOSE 9000

COPY ./overlay /

RUN curl -sSLo - https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \
curl -sSLo /etc/php${PHP_PACKAGE_VERSION}/browscap.ini http://browscap.org/stream\?q=PHP_BrowsCapINI
13 changes: 13 additions & 0 deletions v8.4/overlay/etc/container.d/00-user.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

if [[ ! "$(id -g php)" =~ "${PGID}" ]]; then
echo "> enforcing group id"
groupmod -o -g ${PGID} php
fi

if [[ ! "$(id -u php)" =~ "${PGID}" ]]; then
echo "> enforcing user id"
usermod -o -u ${PUID} php
fi

true
15 changes: 15 additions & 0 deletions v8.4/overlay/etc/container.d/05-config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

if [[ "${PHP_SKIP_TEMPLATES}" != "true" ]]; then
echo "> writing fpm config"
gomplate -V \
-o /etc/php84/php-fpm.conf \
-f /etc/templates/php-fpm.conf.tmpl

if [[ $? -ne 0 ]]; then
echo "failed to write fpm config"
exit 1
fi
fi

true
8 changes: 8 additions & 0 deletions v8.4/overlay/etc/container.d/10-chown.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

if [[ "${PHP_SKIP_CHOWN}" != "true" ]]; then
echo "> chown webroot files"
find ${PHP_WEBROOT} \( \! -user php -o \! -group php \) -print0 | xargs -0 -r chown php:php
fi

true
Loading