php-base (php82-fpm-deb-13-trixie_slim_nginx)

Published 2025-11-04 00:43:05 +01:00 by ovalek in common/php-base

Installation

docker pull forgejo-dev.ovalek.cz/common/php-base:php82-fpm-deb-13-trixie_slim_nginx
sha256:d70ef56ea8f514df8f2d9b9f3959ee57aa89b58d558449dcb79e3e6df6970097

Image layers

# debian.sh --arch 'amd64' out/ 'trixie' '@1760918400'
ENV DEBIAN_FRONTEND=noninteractive
RUN /bin/sh -c set -eux; apt-get update; apt-get -y --no-install-recommends install ca-certificates libargon2-1 libsodium23 libreadline8t64 libmagickwand-7.q16-10 libicu76 libldap2 libzip5 libpng16-16 libjpeg62-turbo libfreetype6 libbz2-1.0 libcurl4 libgd3 libxml2 libwebp7 libonig5; echo "www-data:x:33:" >> /etc/group; echo "www-data:x:33:33:www-data:/var/www:/bin/false" >> /etc/passwd; apt-get clean; rm -rf /var/lib/apt/lists/* # buildkit
COPY /usr/local /usr/local # buildkit
COPY /usr/bin/composer /usr/bin/composer # buildkit
RUN /bin/sh -c mkdir -p /var/www/html && chown -R www-data:www-data /var/www/html # buildkit
WORKDIR /var/www/html
EXPOSE [9000/tcp]
ENTRYPOINT ["docker-php-entrypoint"]
CMD ["php-fpm"]
ARG user=www-data
ARG uid=1000
ENV DEBIAN_FRONTEND=noninteractive
RUN |2 user=www-data uid=1000 /bin/sh -c apt-get update && apt-get install -y --no-install-recommends nginx supervisor && rm -rf /var/lib/apt/lists/* # buildkit
RUN |2 user=www-data uid=1000 /bin/sh -c sed -i 's/^daemonize = yes/daemonize = no/' /usr/local/etc/php-fpm.conf && { echo '[global]'; echo 'error_log = /dev/stderr'; echo ''; echo '[www]'; echo 'access.log = /dev/stdout'; echo 'access.format = "[%{%Y-%m-%dT%H:%M:%S%z}t] %R \"%r\" %s"'; echo 'listen = /var/run/php-fpm.sock'; echo 'listen.owner = www-data'; echo 'listen.group = www-data'; echo 'listen.mode = 0660'; } > /usr/local/etc/php-fpm.d/zzz-overrides.conf && mkdir -p /var/run && chown -R www-data:www-data /var/run # buildkit
RUN |2 user=www-data uid=1000 /bin/sh -c mkdir -p /etc/nginx/conf.d && rm -f /etc/nginx/conf.d/default.conf /etc/nginx/sites-enabled/default && { echo 'server {'; echo ' listen 80 default_server;'; echo ' listen [::]:80 default_server;'; echo ' server_name _;'; echo ' access_log /dev/stdout combined;'; echo ' error_log /dev/stderr;'; echo ' root /var/www/html/www;'; echo ' index index.php index.html;'; echo ' location / {'; echo ' try_files $uri $uri/ /index.php?$query_string;'; echo ' }'; echo ' location ~ \.php$ {'; echo ' try_files $uri =404;'; echo ' fastcgi_split_path_info ^(.+\.php)(/.+)$;'; echo ' fastcgi_pass unix:/var/run/php-fpm.sock;'; echo ' fastcgi_index index.php;'; echo ' include fastcgi_params;'; echo ' fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;'; echo ' fastcgi_param PATH_INFO $fastcgi_path_info;'; echo ' }'; echo ' location ~ /\.ht {'; echo ' deny all;'; echo ' }'; echo '}'; } > /etc/nginx/conf.d/default.conf # buildkit
RUN |2 user=www-data uid=1000 /bin/sh -c { echo '[supervisord]'; echo 'nodaemon=true'; echo 'pidfile=/var/run/supervisord.pid'; echo 'logfile=/dev/stdout'; echo 'logfile_maxbytes=0'; echo 'user=root'; echo ''; echo '[program:php-fpm]'; echo 'command=/usr/local/sbin/php-fpm'; echo 'autostart=true'; echo 'autorestart=true'; echo 'priority=5'; echo 'user=root'; echo 'stdout_logfile=/dev/stdout'; echo 'stdout_logfile_maxbytes=0'; echo 'stderr_logfile=/dev/stderr'; echo 'stderr_logfile_maxbytes=0'; echo ''; echo '[program:nginx]'; echo 'command=/usr/sbin/nginx -g "daemon off;"'; echo 'autostart=true'; echo 'autorestart=true'; echo 'priority=10'; echo 'user=root'; echo 'stdout_logfile=/dev/stdout'; echo 'stdout_logfile_maxbytes=0'; echo 'stderr_logfile=/dev/stderr'; echo 'stderr_logfile_maxbytes=0'; } > /etc/supervisord.conf # buildkit
EXPOSE [80/tcp]
WORKDIR /var/www/html
CMD ["/usr/bin/supervisord" "-c" "/etc/supervisord.conf"]

Labels

Key Value
org.opencontainers.image.revision aa7e5e0575635535f1163b615c5d77e7c43be1a1
Details
Container
2025-11-04 00:43:05 +01:00
67
OCI / Docker
linux/amd64
101 MiB
Versions (28) View all