2026 modernization

- use absolute base image names
- add Trixie support
- user debian/eol for Buster
This commit is contained in:
Jan Dittberner 2026-01-26 18:23:01 +01:00
parent d4ec5f329a
commit 2068ddab18
14 changed files with 164 additions and 7 deletions

View file

@ -1,4 +1,4 @@
FROM debian:bookworm FROM docker.io/debian:bookworm
LABEL maintainer="jan@dittberner.info" LABEL maintainer="jan@dittberner.info"
VOLUME /srv VOLUME /srv

View file

@ -2,8 +2,8 @@
set -e set -e
for dist in jessie_php5 stretch_php7 buster_php7 bullseye_php7 bookworm_php8; do for dist in jessie_php5 stretch_php7 buster_php7 bullseye_php7 bookworm_php8 trixie_php8; do
docker build --pull --no-cache -t gnuviech/${dist}-base ${dist} -f ${dist}/Dockerfile-base docker build --pull -t gnuviech/${dist}-base ${dist} -f ${dist}/Dockerfile-base
docker build -t gnuviech/${dist} ${dist} -f ${dist}/Dockerfile docker build -t gnuviech/${dist} ${dist} -f ${dist}/Dockerfile
docker build -t gnuviech/${dist}-mysql ${dist} -f ${dist}/Dockerfile-mysql docker build -t gnuviech/${dist}-mysql ${dist} -f ${dist}/Dockerfile-mysql
docker build -t gnuviech/${dist}-pgsql ${dist} -f ${dist}/Dockerfile-pgsql docker build -t gnuviech/${dist}-pgsql ${dist} -f ${dist}/Dockerfile-pgsql

View file

@ -1,4 +1,4 @@
FROM debian:bullseye FROM docker.io/debian:bullseye
LABEL maintainer="jan@dittberner.info" LABEL maintainer="jan@dittberner.info"
VOLUME /srv VOLUME /srv

View file

@ -1,4 +1,4 @@
FROM debian:buster FROM docker.io/debian/eol:buster
LABEL maintainer="jan@dittberner.info" LABEL maintainer="jan@dittberner.info"
VOLUME /srv VOLUME /srv

View file

@ -1,4 +1,4 @@
FROM debian/eol:jessie FROM docker.io/debian/eol:jessie
LABEL maintainer="jan@dittberner.info" LABEL maintainer="jan@dittberner.info"
VOLUME /srv VOLUME /srv

View file

@ -1,4 +1,4 @@
FROM debian/eol:stretch FROM docker.io/debian/eol:stretch
LABEL maintainer="jan@dittberner.info" LABEL maintainer="jan@dittberner.info"
VOLUME /srv VOLUME /srv

10
trixie_php8/Dockerfile Normal file
View file

@ -0,0 +1,10 @@
FROM gnuviech/trixie_php8-base:latest
LABEL maintainer="jan@dittberner.info"
RUN rm -f /etc/php/8.4/fpm/pool.d/www.conf
COPY start-fpm.sh /usr/local/sbin
COPY fpm-pool.conf.tmpl /usr/local/etc
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/usr/local/sbin/start-fpm.sh"]

View file

@ -0,0 +1,33 @@
FROM docker.io/debian:trixie
LABEL maintainer="jan@dittberner.info"
VOLUME /srv
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
ca-certificates \
dumb-init \
libnss-ldapd \
nullmailer \
openssl \
php-mail \
php-mail-mime \
php-net-smtp \
php-net-socket \
php8.4 \
php8.4-curl \
php8.4-fpm \
php8.4-fpm \
php8.4-gd \
php8.4-imagick \
php8.4-intl \
php8.4-mbstring \
php8.4-opcache \
php8.4-pspell \
php8.4-sqlite3 \
php8.4-zip \
psmisc \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*.*
ADD --chown=root:root nsswitch.conf nslcd.conf /etc/

View file

@ -0,0 +1,18 @@
FROM gnuviech/trixie_php8-base:latest
LABEL maintainer="jan@dittberner.info"
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
php8.4-dba \
php8.4-mysql \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*.*
RUN rm -f /etc/php/8.4/fpm/pool.d/www.conf
COPY start-fpm.sh /usr/local/sbin
COPY fpm-pool.conf.tmpl /usr/local/etc
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/usr/local/sbin/start-fpm.sh"]

View file

@ -0,0 +1,17 @@
FROM gnuviech/trixie_php8-base:latest
LABEL maintainer="jan@dittberner.info"
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
php8.4-pgsql \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*.*
RUN rm -f /etc/php/8.4/fpm/pool.d/www.conf
COPY start-fpm.sh /usr/local/sbin
COPY fpm-pool.conf.tmpl /usr/local/etc
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/usr/local/sbin/start-fpm.sh"]

View file

@ -0,0 +1,15 @@
[@user@]
user = @user@
group = @user@
listen = /var/run/php-fpm-docker/@user@-@variant@.sock
listen.owner = www-data
listen.group = www-data
pm = dynamic
pm.max_children = 20
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.max_requests = 1000
chdir = /
request_slowlog_timeout = 10s
slowlog = /var/log/php-fpm-docker/@user@-@variant@.slow.log

32
trixie_php8/nslcd.conf Normal file
View file

@ -0,0 +1,32 @@
# /etc/nslcd.conf
# nslcd configuration file. See nslcd.conf(5)
# for details.
# The user and group nslcd should run as.
uid nslcd
gid nslcd
# The location at which the LDAP server(s) should be reachable.
uri ldap://10.0.0.11/
# The search base that will be used for all queries.
base dc=gnuviech,dc=internal
# The LDAP protocol version to use.
#ldap_version 3
# The DN to bind with for normal lookups.
#binddn cn=annonymous,dc=example,dc=net
#bindpw secret
# The DN used for password modifications by root.
#rootpwmoddn cn=admin,dc=example,dc=com
# SSL options
#ssl off
#tls_reqcert never
tls_cacertfile /etc/ssl/certs/ca-certificates.crt
# The search scope.
#scope sub

20
trixie_php8/nsswitch.conf Normal file
View file

@ -0,0 +1,20 @@
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: files ldap
group: files ldap
shadow: files ldap
gshadow: files
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis

12
trixie_php8/start-fpm.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
set -e
sed "s/@user@/${FPM_USER}/g; s/@variant@/${FPM_VARIANT}/g" \
< /usr/local/etc/fpm-pool.conf.tmpl \
> "/etc/php/8.4/fpm/pool.d/${FPM_USER}.conf"
/etc/init.d/nslcd start
/etc/init.d/nullmailer start
mkdir -p /run/php
/usr/sbin/php-fpm8.4 --nodaemonize