HUB
Sign inSign up
php-alpine logo

c0ns0l3/php-alpine

By c0ns0l3

•Updated about 1 month ago

PHP-FPM alpine v.8.3.36

Image
Languages & frameworks
Web servers
0

2.0K

c0ns0l3/php-alpine repository overview

⁠PHP 8.3 FPM Alpine

PHP-FPM image with additional PHP extensions, development utilities, browser automation and media processing tools.

Docker Hub⁠

⁠Image configuration

ComponentVersion
PHP8.3.36
Alpine Linux3.24
Node.js22.23.0
ComposerInstalled during image build
Architectureslinux/amd64, linux/arm64

Only PHP 8.3 is maintained in this repository.

PHP extensions installed through PECL are not version-pinned, except for SSH2 (1.3.1). Their versions depend on the build date.

⁠Pull image

docker pull c0ns0l3/php-alpine:8.3

⁠Build locally

Run from the directory containing the Dockerfile:

docker build -t c0ns0l3/php-alpine:8.3 .

⁠Multi-platform build

⁠Initialize Buildx

Create a builder once:

docker buildx create --name php-builder --driver docker-container --use
docker buildx inspect --bootstrap

To select an existing builder:

docker buildx use php-builder
⁠Build and push both architectures

Authenticate with Docker Hub:

docker login

Build and publish:

docker buildx build \
  --platform linux/amd64,linux/arm64 \
  -t c0ns0l3/php-alpine:8.3 \
  --push .

Building a non-native architecture requires emulation or a builder with a native node for that architecture.

⁠Build architectures separately

On an AMD64 builder:

docker buildx build \
  --platform linux/amd64 \
  -t c0ns0l3/php-alpine:8.3-amd64 \
  --push .

On an ARM64 builder, using the same Dockerfile revision:

docker buildx build \
  --platform linux/arm64 \
  -t c0ns0l3/php-alpine:8.3-arm64 \
  --push .

After both images have been pushed, publish the shared tag:

docker buildx imagetools create \
  -t c0ns0l3/php-alpine:8.3 \
  c0ns0l3/php-alpine:8.3-amd64 \
  c0ns0l3/php-alpine:8.3-arm64

Docker automatically selects the appropriate architecture when pulling the shared tag.

⁠Inspect published platforms
docker buildx imagetools inspect c0ns0l3/php-alpine:8.3

⁠Runtime configuration

  • Working directory: /var/www
  • Default process: PHP-FPM, inherited from the official PHP image
  • www-data UID: 1000
  • Chromium executable: /usr/bin/chromium-browser

The image sets:

ENV PUPPETEER_EXECUTABLE_PATH="/usr/bin/chromium-browser"

The www-data UID is configured during the build:

usermod -u 1000 www-data

This changes the user ID; it does not change the group ID or existing file ownership.

⁠Installed tools

  • Node.js and npm
  • Composer
  • Curl Impersonate
  • Chromium
  • Xvfb
  • FFmpeg
  • ImageMagick
  • Ghostscript
  • VIPS
  • jpegoptim
  • Python 3 and pip
  • Supervisor
  • Git
  • Bash, completion and documentation
  • Midnight Commander
  • htop
  • su-exec
  • Time zone data and CA certificates

⁠Installed PHP extensions

Additional extensions built or enabled by the Dockerfile:

  • amqp
  • apcu
  • bcmath
  • bz2
  • exif
  • ftp
  • gd
  • gettext
  • gmp
  • igbinary
  • imagick
  • imap
  • intl
  • lz4
  • memcache
  • mongodb
  • msgpack
  • mysqli
  • oauth
  • opcache
  • pcntl
  • pdo_dblib
  • pdo_mysql
  • pdo_pgsql
  • pgsql
  • redis
  • soap
  • sodium
  • ssh2
  • tidy
  • uuid
  • vips
  • xsl
  • yaml
  • zip

Redis is built with support for:

  • igbinary
  • MessagePack
  • Zstandard
  • LZ4

⁠Verify installed versions

⁠PHP
docker run --rm c0ns0l3/php-alpine:8.3 php -v
⁠PHP extensions
docker run --rm c0ns0l3/php-alpine:8.3 php -m
⁠Node.js
docker run --rm c0ns0l3/php-alpine:8.3 node --version
⁠Composer
docker run --rm c0ns0l3/php-alpine:8.3 composer --version
⁠Alpine Linux
docker run --rm c0ns0l3/php-alpine:8.3 cat /etc/alpine-release

Tag summary

Content type

Image

Digest

sha256:3afec03c2…

Size

481.8 MB

Last updated

about 1 month ago

docker pull c0ns0l3/php-alpine