Sign inSign up

williarin/php

By williarin

Updated over 1 year ago

Up to date PHP 7.4, 8.0, 8.1, 8.2, 8.3 images based on Alpine Linux for production and development

Image
0

10K+

williarin/php repository overview

PHP 7.4, 8.0, 8.1, 8.2, 8.3 images

Images are built once a week at 00:00 on Monday.

Details

All PHP images are based on Alpine Linux 3.18 (williarin/alpine). They come with bash, zsh, zip, unzip and widely used PHP extensions.

Installed PHP extensions:

json, ctype, curl, dom, ftp, gd, iconv, intl, mbstring, mysqlnd, openssl, pdo, pdo_sqlite, pdo_mysql, pdo_pgsql, pear, phar, posix, session, sqlite3, xml, xmlreader, zip, zlib, opcache, tokenizer, simplexml, xmlwriter, fileinfo, sodium

Additionally, -dev versions come with Xdebug 3, Git and Make.

Available tags

ImageSize
williarin/php:8.3
williarin/php:8.3-dev
williarin/php:8.3-fpm
williarin/php:8.3-fpm-dev
williarin/php:8.2
williarin/php:8.2-dev
williarin/php:8.2-fpm
williarin/php:8.2-fpm-dev
williarin/php:8.1
williarin/php:8.1-dev
williarin/php:8.1-fpm
williarin/php:8.1-fpm-dev
williarin/php:8.0
williarin/php:8.0-dev
williarin/php:8.0-fpm
williarin/php:8.0-fpm-dev
williarin/php:7.4
williarin/php:7.4-dev
williarin/php:7.4-fpm
williarin/php:7.4-fpm-dev

Docker Security

All the images are pre-built with a user www-data and a group with the same name. Generally there is no need to run containers with root privileges, so we advise the following:

Specify a --user name and set the working directory on docker runs, e.g.:

docker run --user www-data -w /home/www-data --rm williarin/php:8.2-dev bash -c "php -v | grep 'Xdebug'"

Confirm it by running:

docker run --user www-data -w /home/www-data --rm williarin/php:8.2-dev bash -c "id ; env"
Extend the images to your needs

You can easily add PHP extensions using Alpine package manager.

As an example, create a new image with this Dockerfile to add exif extension to PHP:

FROM williarin/php:8.2-fpm

RUN apk add --no-cache \
        php82-exif \
    ;

Tag summary

Content type

Image

Digest

sha256:4a66d774a

Size

44.8 MB

Last updated

over 1 year ago

docker pull williarin/php:8.3-fpm-dev