Sign inSign up

kalidyasin/php

By kalidyasin

•Updated 3 months ago

Image
Languages & frameworks
Developer tools
Web servers
0

611

kalidyasin/php repository overview

⁠PHP Docker Images (Alpine)

A collection of optimized PHP Docker images based on Alpine Linux, including FPM, CLI, and ZTS variants for PHP versions 8.2, 8.3, 8.4, and 8.5.

Images are available on Docker Hub: kalidyasin/php⁠

⁠Features

  • Lightweight: Based on Alpine Linux.
  • Pre-configured Extensions: Includes commonly used extensions:
    • gd (with FreeType, JPEG, and WebP support)
    • pdo, pdo_mysql, pdo_pgsql
    • zip, mbstring, exif, pcntl, bcmath, calendar
    • redis (via PECL)
  • Composer: Latest version included in all variants.
  • Variants: fpm, cli, and zts.

⁠Supported Versions & Tags

Images follow the naming convention: kalidyasin/php:<version>-<variant>-alpine

PHP VersionAlpineVariantsDocker Hub Tag Examples
8.5Yesfpm, cli, zts8.5-fpm-alpine, 8.5-cli-alpine
8.4Yesfpm, cli, zts8.4-fpm-alpine, 8.4-cli-alpine
8.3Yesfpm, cli, zts8.3-fpm-alpine, 8.3-cli-alpine
8.2Yesfpm, cli, zts8.2-fpm-alpine, 8.2-cli-alpine

⁠Usage Instructions

⁠1. Docker
⁠Pull an Image
docker pull kalidyasin/php:8.5-fpm-alpine
⁠Run a Container
docker run -it --rm -v $(pwd):/var/www/html kalidyasin/php:8.5-fpm-alpine
⁠2. Docker Compose

Create a docker-compose.yml file:

services:
  app:
    image: kalidyasin/php:8.5-fpm-alpine
    volumes:
      - .:/var/www/html
    ports:
      - "9000:9000"

Run with:

docker compose up -d
⁠3. Podman
⁠Run a Container
podman run -it --rm -v $(pwd):/var/www/html:Z kalidyasin/php:8.5-fpm-alpine

Note: The :Z flag is often needed on systems with SELinux (like Fedora/RHEL) to handle volume permissions.

⁠4. Podman Compose

Using the same docker-compose.yml as above:

podman-compose up -d

⁠Building from Source

If you want to build the images locally or customize them:

⁠Build using Docker
docker build -t my-php-app:8.5-fpm ./8.5/alpine/fpm
⁠Build using Podman
podman build -t my-php-app:8.5-fpm ./8.5/alpine/fpm

⁠Building from Source

The source code for these images is available on GitHub⁠. To customize and build your own version:

git clone https://github.com/kalidyasin/docker-php.git
cd docker-php/8.5/alpine/fpm
docker build -t my-custom-php .

Tag summary

Content type

Image

Digest

sha256:8add9e0c0…

Size

42.6 MB

Last updated

3 months ago

docker pull kalidyasin/php:8.2-fpm-alpine