Skip to content

Docker image for PHP7.4 with Xdebug and Composer

License

Notifications You must be signed in to change notification settings

sineverba/php74xc

Repository files navigation

php74xc: Docker image for PHP7.4.x + Xdebug + Composer

docker pull sineverba/php74xc:1.10.0

CD / CI
Semaphore CI Build Status

Docker image built from PHP7.4.x CLI official + Xdebug + Composer, multiarchitectures.

Short tags are OFF.

Image ready to use as alias for development.

Do you use it? Star it!

Github / image tags and versions

Github / Docker Image tag PHP Version Composer version XDebug Architectures
latest 7.4.33 1.10.27 3.1.6 linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
1.11.0 7.4.33 1.10.27 3.1.6 linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
1.10.0 7.4.33 1.10.27 3.1.5 linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
1.9.0 7.4.33 1.10.26 3.1.5 linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
1.8.0 7.4.33 1.10.26 3.1.5 linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
1.7.0 7.4.29 1.10.26 3.1.4 linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
1.6.0 7.4.28 1.10.25 3.1.3 linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
1.5.0 7.4.22 1.10.22 3.0.4 linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
1.4.0 7.4.20 1.10.22 3.0.4 linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
1.3.0 7.4.19 1.10.22 3.0.4 linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
1.2.0 7.4.16 1.10.22 3.0.4 linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
1.1.0 7.4.16 1.10.21 3.0.3 linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
1.0.1 7.4.16 1.10.20 3.0.3 linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
1.0.0 7.4.16 1.10.20 3.0.3 linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64

Xdebug and settings

During development, you can enable/disable xdebug.mode` with

# docker-compose.yml
services:
  app:
    environment:
      XDEBUG_MODE: "off"

For values, see https://xdebug.org/docs/all_settings#mode

OpCache and settings

During development, you can enable/disable opcache_validate_timestamps with

# docker-compose.yml
services:
  app:
    environment:
      PHP_OPCACHE_VALIDATE_TIMESTAMPS: 1

Update local image

$ docker pull sineverba/php74xc:latest

PHP modules

$ docker run --rm sineverba/php74xc php -m

PHP modules
bcmath
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
sodium
SPL
sqlite3
standard
tokenizer
xdebug
xml
xmlreader
xmlreader
xmlwriter
xmlreader
zlib
Xdebug
zip

Add image as alias

$ cd ~
$ nano .bashrc
$ alias php74='docker run -it -w /data -v ${PWD}:/data --entrypoint php --rm sineverba/php74xc:1.11.0'
$ alias composer74='docker run -it -w /data -v ${PWD}:/data --entrypoint "/usr/bin/composer" --rm sineverba/php74xc:1.11.0'

Issues with memory limit (on composer)

$ php -d memory_limit=-1 /usr/bin/composer require [...]