Skip to main content

PHP Docker Images ByJG

Opensource ByJG GitHub source Build Status

See full documentation at: https://opensource.byjg.com/devops/docker-php

A complete and small PHP Docker image based on Alpine Linux and run on the archictectures

  • amd64 (x86_64)
  • arm64 (Raspberry PI, Graviton, etc) - available after February 2021

The Docker ByJG PHP Images has several bundled images based on PHP in different versions.

The PHP images are ready to use in:

  • Development Environment
  • Production Environment
  • CI/CD environments (like Travis-CI, Circle-CI, Jenkis, Bitbucket Pipelines, and others)
  • IDE Integration

PHP Versions Available

VersionLatest VersionMonthly Builds
8.38.3.1yes
8.28.2.14yes
8.18.1.27yes
8.08.0.30-
7.47.4.33-
7.37.3.33-
7.27.2.33-
7.17.1.33-
7.07.0.33-
5.65.6.40-

PHP Images

Five different images for each PHP Version

  • base - Minimal Image, base for the other
  • cli - PHP with Command Line installed (composer, phpunit, etc)
  • fpm - PHP with FPM installed
  • fpm-apache - PHP and Apache using FPM
  • fpm-nginx - PHP and Nginx using FPM

Image Tag Convention

Since January 2021 de tag convention is:

byjg/php:<PHP_VERSION>-<TYPE>[-YYYY.MM]

Where:

  • PHP_VERSION: It is <MAJOR>.<MINOR>, e.g 8.2
  • TYPE: It is base, cli, fpm, fpn-nginx, fpm-apache
  • YYYY: The Year of the Build
  • MM: The month of the build.

The images without YYYY-MM can be updated to the latest PHP version and new features. The images with YYYY-MM are immutable

e.g.

byjg/php:8.2-fpm
byjg/php:8.2-fpm-2023.01

Environment variables

Here a list of environment variables.

Image Sizes

Below a table with images uncompressed

Build TypeUncompressed Size
base~135MB
cli~154MB
fpm~139MB
fpm-nginx~154MB
fpm-apache~154MB

Building your own image

Detailed instructions can be found here.


Open source ByJG