diff --git a/bookworm_php8/Dockerfile-base b/bookworm_php8/Dockerfile-base index c936279..e49a8db 100644 --- a/bookworm_php8/Dockerfile-base +++ b/bookworm_php8/Dockerfile-base @@ -1,4 +1,4 @@ -FROM debian:bookworm +FROM docker.io/debian:bookworm LABEL maintainer="jan@dittberner.info" VOLUME /srv diff --git a/build.sh b/build.sh index 025076f..3a48d98 100755 --- a/build.sh +++ b/build.sh @@ -2,8 +2,8 @@ set -e -for dist in jessie_php5 stretch_php7 buster_php7 bullseye_php7 bookworm_php8; do - docker build --pull --no-cache -t gnuviech/${dist}-base ${dist} -f ${dist}/Dockerfile-base +for dist in jessie_php5 stretch_php7 buster_php7 bullseye_php7 bookworm_php8 trixie_php8; do + 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}-mysql ${dist} -f ${dist}/Dockerfile-mysql docker build -t gnuviech/${dist}-pgsql ${dist} -f ${dist}/Dockerfile-pgsql diff --git a/bullseye_php7/Dockerfile-base b/bullseye_php7/Dockerfile-base index a37ee8d..565e625 100644 --- a/bullseye_php7/Dockerfile-base +++ b/bullseye_php7/Dockerfile-base @@ -1,4 +1,4 @@ -FROM debian:bullseye +FROM docker.io/debian:bullseye LABEL maintainer="jan@dittberner.info" VOLUME /srv diff --git a/buster_php7/Dockerfile-base b/buster_php7/Dockerfile-base index 4e84f6c..cb0d8db 100644 --- a/buster_php7/Dockerfile-base +++ b/buster_php7/Dockerfile-base @@ -1,4 +1,4 @@ -FROM debian:buster +FROM docker.io/debian/eol:buster LABEL maintainer="jan@dittberner.info" VOLUME /srv diff --git a/jessie_php5/Dockerfile-base b/jessie_php5/Dockerfile-base index 1b5de18..c517693 100644 --- a/jessie_php5/Dockerfile-base +++ b/jessie_php5/Dockerfile-base @@ -1,4 +1,4 @@ -FROM debian/eol:jessie +FROM docker.io/debian/eol:jessie LABEL maintainer="jan@dittberner.info" VOLUME /srv diff --git a/stretch_php7/Dockerfile-base b/stretch_php7/Dockerfile-base index 6a92f46..33618e0 100644 --- a/stretch_php7/Dockerfile-base +++ b/stretch_php7/Dockerfile-base @@ -1,4 +1,4 @@ -FROM debian/eol:stretch +FROM docker.io/debian/eol:stretch LABEL maintainer="jan@dittberner.info" VOLUME /srv diff --git a/trixie_php8/Dockerfile b/trixie_php8/Dockerfile new file mode 100644 index 0000000..89b3638 --- /dev/null +++ b/trixie_php8/Dockerfile @@ -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"] diff --git a/trixie_php8/Dockerfile-base b/trixie_php8/Dockerfile-base new file mode 100644 index 0000000..d566e82 --- /dev/null +++ b/trixie_php8/Dockerfile-base @@ -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/ diff --git a/trixie_php8/Dockerfile-mysql b/trixie_php8/Dockerfile-mysql new file mode 100644 index 0000000..c04e404 --- /dev/null +++ b/trixie_php8/Dockerfile-mysql @@ -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"] diff --git a/trixie_php8/Dockerfile-pgsql b/trixie_php8/Dockerfile-pgsql new file mode 100644 index 0000000..cbb31af --- /dev/null +++ b/trixie_php8/Dockerfile-pgsql @@ -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"] diff --git a/trixie_php8/fpm-pool.conf.tmpl b/trixie_php8/fpm-pool.conf.tmpl new file mode 100644 index 0000000..b5f2976 --- /dev/null +++ b/trixie_php8/fpm-pool.conf.tmpl @@ -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 diff --git a/trixie_php8/nslcd.conf b/trixie_php8/nslcd.conf new file mode 100644 index 0000000..ca893ae --- /dev/null +++ b/trixie_php8/nslcd.conf @@ -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 + diff --git a/trixie_php8/nsswitch.conf b/trixie_php8/nsswitch.conf new file mode 100644 index 0000000..8f60129 --- /dev/null +++ b/trixie_php8/nsswitch.conf @@ -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 diff --git a/trixie_php8/start-fpm.sh b/trixie_php8/start-fpm.sh new file mode 100755 index 0000000..31e17df --- /dev/null +++ b/trixie_php8/start-fpm.sh @@ -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