Zdeněk Zenkl zdenek
  • Joined on 2024-12-10

docker-php-alpine (0.2.1)

Published 2025-08-30 22:19:42 +02:00 by zdenek in zdenek/docker-php-alpine

Installation

docker pull git.najihu.net/zdenek/docker-php-alpine:0.2.1
sha256:15241afba7415e39403aa4aefc0533cec73ef3047b2efe7d1ddd87b03dc7673c

About this package

Apache + PHP 8.4 on Alpine (FPM)

Image Layers

ADD alpine-minirootfs-3.22.1-x86_64.tar.gz / # buildkit
CMD ["/bin/sh"]
RUN /bin/sh -c set -eux; apk add --no-cache apache2 apache2-proxy apache2-http2 php84 php84-fpm php84-opcache php84-session php84-mysqli php84-pdo php84-pdo_mysql php84-ctype php84-tokenizer php84-xml php84-gd php84-curl php84-mbstring php84-pgsql php84-pdo_pgsql tzdata curl; mkdir -p /run/apache2 /run/php /var/www/html; sed -ri 's|^[#[:space:]]*ErrorLog .*|ErrorLog /dev/stderr|g' /etc/apache2/httpd.conf; sed -ri 's|^[#[:space:]]*CustomLog .*|CustomLog /dev/stdout combined|g' /etc/apache2/httpd.conf; sed -ri 's|#ServerName www.example.com:80|ServerName localhost|g' /etc/apache2/httpd.conf; sed -ri 's|^listen = .*|listen = 127.0.0.1:9000|g' /etc/php84/php-fpm.d/www.conf; if [ -f /etc/php84/php.ini-production ]; then cp /etc/php84/php.ini-production /etc/php84/php.ini; fi; if [ -d /var/www/localhost/htdocs ]; then rmdir /var/www/localhost/htdocs || true; ln -s /var/www/html /var/www/localhost/htdocs; fi # buildkit
RUN /bin/sh -c set -eux; sed -ri 's|^(LoadModule\s+mpm_prefork_module\b.*)$|# \1|' /etc/apache2/httpd.conf; grep -q '^LoadModule mpm_event_module' /etc/apache2/httpd.conf || echo 'LoadModule mpm_event_module /usr/lib/apache2/mod_mpm_event.so' >> /etc/apache2/httpd.conf # buildkit
RUN /bin/sh -c set -eux; apk add --no-cache unixodbc gnupg curl; apk add --no-cache --virtual .build-deps php84-dev php84-pear autoconf make g++ unixodbc-dev; arch="$(apk --print-arch)"; case "$arch" in x86_64) msarch=amd64 ;; aarch64) msarch=arm64 ;; *) echo "unsupported arch: $arch"; exit 1 ;; esac; curl -fsSLO "https://download.microsoft.com/download/fae28b9a-d880-42fd-9b98-d779f0fdd77f/msodbcsql18_18.5.1.1-1_${msarch}.apk"; apk add --allow-untrusted "./msodbcsql18_18.5.1.1-1_${msarch}.apk"; rm -f msodbcsql18_*.apk; ln -sf /usr/bin/php84 /usr/bin/php; ln -sf /usr/bin/phpize84 /usr/bin/phpize; ln -sf /usr/bin/pecl84 /usr/bin/pecl; pecl install sqlsrv pdo_sqlsrv; echo "extension=sqlsrv.so" > /etc/php84/conf.d/20_sqlsrv.ini; echo "extension=pdo_sqlsrv.so" > /etc/php84/conf.d/30_pdo_sqlsrv.ini; apk del .build-deps # buildkit
RUN /bin/sh -c sed -ri 's|^(LoadModule\s+lbmethod_heartbeat_module\b.*)|# \1|' /etc/apache2/httpd.conf # buildkit
COPY apache-phpfpm.conf /etc/apache2/conf.d/php-fpm.conf # buildkit
COPY data/www/ /var/www/html/ # buildkit
HEALTHCHECK &{["CMD-SHELL" "wget -qO- http://127.0.0.1/ >/dev/null || exit 1"] "30s" "3s" "0s" "0s" '\x03'}
LABEL org.opencontainers.image.title=docker-php-alpine org.opencontainers.image.description=Apache + PHP 8.4 on Alpine (FPM) org.opencontainers.image.source=https://git.najihu.net/zdenek/docker-php-alpine org.opencontainers.image.licenses=MIT
COPY docker-entrypoint.sh /docker-entrypoint.sh # buildkit
RUN /bin/sh -c chmod +x /docker-entrypoint.sh # buildkit
EXPOSE map[80/tcp:{}]
CMD ["/docker-entrypoint.sh"]

Labels

Key Value
org.opencontainers.image.description Apache + PHP 8.4 on Alpine (FPM)
org.opencontainers.image.licenses MIT
org.opencontainers.image.source https://git.najihu.net/zdenek/docker-php-alpine
org.opencontainers.image.title docker-php-alpine
Details
Container
2025-08-30 22:19:42 +02:00
5
OCI / Docker
linux/amd64
MIT
36 MiB
Versions (4) View all
latest 2025-09-23
0.2.1 2025-08-30
0.2.0 2025-08-30
0.1.0 2025-08-30