Sign inSign up

andrewmackrodt/php

By andrewmackrodt

•Updated 5 months ago

PHP and composer images for 5.6 -> 8.4.

Image
2

100K+

andrewmackrodt/php repository overview

⁠andrewmackrodt/docker-php⁠

Status Pulls Dockerfile Size Version

PHP⁠ is a popular general-purpose scripting language that is especially suited to web development. Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.

⁠Versions

PHP 8.4 is tagged as latest. Images for versions 5.6 -> 8.3 are also provided:

  • andrewmackrodt/php:5.6 Legacy (end-of-life: 2018-12-31)
  • andrewmackrodt/php:7.0 Legacy (end-of-life: 2019-01-10)
  • andrewmackrodt/php:7.1 Legacy (end-of-life: 2019-12-01)
  • andrewmackrodt/php:7.2 Legacy (end-of-life: 2020-11-30)
  • andrewmackrodt/php:7.3 Legacy (end-of-life: 2021-12-06)
  • andrewmackrodt/php:7.4 Legacy (end-of-life: 2022-11-28)
  • andrewmackrodt/php:8.0 Legacy (end-of-life: 2023-11-26)
  • andrewmackrodt/php:8.1 Security Support (end-of-life: 2025-12-31)
  • andrewmackrodt/php:8.2 Security Support (end-of-life: 2026-12-31)
  • andrewmackrodt/php:8.3 Latest (end-of-life: 2027-12-31)
  • andrewmackrodt/php:8.4 Latest (end-of-life: 2028-12-31)

Update Schedule

Images are built nightly and images will be updated as new major.minor.patch-release packages of PHP are released. It's possible to pull a specific tag, e.g. docker pull andrewmackrodt/php:7.3.24-r3, see Docker Hub⁠ for a list of supported tags.

Removal Policy

Old tags are subject to removal periodically without notice.

⁠Features

All images include composer⁠.

Extensions:

  • Core: cli, common, dev, readline, json, curl
  • Compression: bz2, zip
  • Database: mysql, pgsql, sqlite3, memcached, redis
  • Debug: xdebug (set env.XDEBUG_ENABLE=1)
  • Math: bcmath, gmp
  • Performance: igbinary, opcache
  • Other: gd, imap, intl, mbstring, soap, xml, xsl
  • Legacy: mcrypt (PHP <= 7.1)

⁠Usage

⁠docker
# start interactive mode
docker run --rm -it andrewmackrodt/php -a

# print version
docker run --rm andrewmackrodt/php --version

# print version with xdebug
docker run --rm -e XDEBUG_ENABLE=1 andrewmackrodt/php --version

# start the builtin server with xdebug enabled, on port 8080 and serving the current directory
docker run --rm -it \
  -e PUID=$(id -u) \
  -e PGID=$(id -g) \
  -e XDEBUG_ENABLE=1 \
  -p 8080:8080 \
  -v $PWD:/app \
  andrewmackrodt/php -S 0.0.0.0:8080 -t /app

# run composer install in the current directory
docker run --rm -it \
  -e PUID=$(id -u) \
  -e PGID=$(id -g) \
  -v $PWD:/app \
  -w /app \
  andrewmackrodt/php composer install

⁠Parameters

ParameterFunction
-e PUID=1000The user id, recommended: $(id -u)
-e PGID=1000The group id, recommended: $(id -g)
-e SUDO_NOPASSWD=0Set to 1 to allow passwordless sudo
-e XDEBUG_ENABLE=0Set to "1" to enable xdebug

Tag summary

Content type

Image

Digest

sha256:09540b6f6…

Size

160.3 MB

Last updated

5 months ago

docker pull andrewmackrodt/php