Sign inSign up

akibawolf/php

By akibawolf

•Updated 14 days ago

Image
0

3.1K

akibawolf/php repository overview

⁠PHP

akibawolf/php packages recent versions of PHP using Debian as the base image.

Base images used:

  • php-stretch for 7.0
  • php-buster for 7.1 and 7.2
  • php-bullseye for 7.3, 7.4, 8.0 and 8.1
  • php-bookworm for 8.2
  • php-trixie for 8.3 and newer

⁠Pre-installed packages

  • curl
  • ffmpeg (for PHP >= 8.3.0)
  • git
  • ping
  • mc
  • mplayer (for PHP >= 8.3.0)
  • nano
  • supervisor
  • unzip
  • vim
  • wget

⁠Pre-configured extensions

  • apcu (for PHP >= 8.2.0)
  • bcmath
  • gd
  • gearman
  • geoip (for PHP < 8.4.0)
  • imagick
  • intl
  • mbstring
  • mcrypt
  • memcached
  • mysqli
  • opcache (for PHP < 8.5.0)
  • pcntl (for PHP >= 8.2.0)
  • pdo_mysql
  • pdo_pgsql
  • redis
  • sockets (for PHP >= 8.2.0)
  • xdebug (for images with xdebug suffix)
  • xml (for PHP >= 8.2.0)
  • xsl (for PHP >= 8.2.0)
  • zip (for PHP >= 8.2.0)

⁠Usage

CLI shell:

docker run --rm -it akibawolf/php:cli-latest bash

FPM:

docker run --rm -v /app:/app --env FPM_PORT=9001 --expose 9001 akibawolf/php:fpm-latest

Docker compose:

php:
  image: akibawolf/php:fpm-latest
  container_name: project-php
  working_dir: /app/project
  environment:
    FPM_PORT: 9001
  volumes:
    - ./web/project:/app/project
  networks:
    - default
  expose:
    - 9001

Docker compose with Xdebug:

php:
  image: akibawolf/php:8.4-xdebug-fpm
  container_name: project-php
  working_dir: /app/project
  environment:
    FPM_PORT: 9001
    PHP_IDE_CONFIG: serverName=yourdomain.com
  volumes:
    - ./web/project:/app/project
  extra_hosts:
    - host.docker.internal:host-gateway
  networks:
    - default
  expose:
    - 9001

⁠Configuration defaults

NameValue
short_open_tagOff
implicit_flushOff
max_execution_time30
max_input_time60
memory_limit128M
error_reportingE_ALL & ~E_DEPRECATED & ~E_STRICT
display_errorsOn
display_startup_errorsOff
log_errorsOn
error_log/dev/stderr
post_max_size140M
default_mimetypetext/html
default_charsetUTF-8
file_uploadsOn
upload_max_filesize128M
max_file_uploads20
date.timezoneAsia/Tashkent

⁠FPM environment variables

NameDefault value
FPM_USERwww-data
FPM_GROUPwww-data
FPM_HOST0.0.0.0
FPM_PORT9000
PHP_MEMORY_LIMIT *128M
PHP_POST_MAX_SIZE140M
PHP_UPLOAD_MAX_FILESIZE128M

* Available in images that provide PHP 7.1 and higher.

⁠Xdebug environment variables

NameDefault value
PHP_IDE_CONFIGserverName=localhost
XDEBUG_CLIENT_HOSThost.docker.internal
XDEBUG_CLIENT_PORT9003
XDEBUG_IDE_KEYPHPSTORM
XDEBUG_START_WITH_REQUESTyes

Available in FPM Xdebug images.

⁠Configuration

You can also inject your version of configuration files as needed:

  • /usr/local/etc/php/php.ini
  • /usr/local/etc/php-fpm.conf
  • /usr/local/etc/php-fpm.d/www.conf
  • /etc/supervisor/conf.d/supervisord.conf
  • /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

Tag summary

Content type

Image

Digest

sha256:4fb7c0ddf…

Size

549.3 MB

Last updated

6 months ago

docker pull akibawolf/php