Public | Automated Build

Last pushed: a month ago
Short Description
PHP with pre installed tools and extensions. Also there is a modified ssh config.
Full Description

Docker Image: milchundzucker/php-essentials

This is one of our docker images we use to build our software with GitLab CI (Jenkins TBA). It comes with some pre-installed
tools, libraries, php-extensions and modified configurations.

How to use this image

There are two things you should know upfront:

  1. This image was build with xdebug but turned it off by default to speed up composer. If you need xdebug
    (i.e. code coverage with phpunit). You have to call xdebug on (and xdebug off to deactivate it again) before you run
    something which relies on xdebug.
  2. This image was also build with the uopz PHP extension, which is also turned off by default. If you need uopz
    (i.e. swizzling code to ease up testing PHP functions such as header()), you have to call uopz on (and uopz off to deactivate
    it again before you can run something which relies on uopz.

On your Desktop

To run this image on your desktop and get a shell inside the container, you can run the following:

docker run --rm -it milchundzucker/php-essentials:5.6 bash

Example: GitLab CI

A common task is to run phpunit tests with code coverage:

  image: milchundzucker/php-essentials:5.6
    - composer install
    - xdebug on
    - phpunit
    - docker

What's installed?

  • composer
  • Phing
  • PHP Extensions
    • bz2
    • gmp
    • intl
    • opcache
    • pdo_mysql
    • soap
    • sockets
    • sodium
    • ssh2
    • zip
  • VCS Tools
    • git
    • subversion
  • Shims to (de)activate xdebug and uopz
  • rsync and ssh
  • trusted milchundzucker CA certificates
  • modified SSH client config to accept every host key for *


  • 5.4 & 5.6 come with old sodium (1.0.x) PECL extension which differs from 2.x significantly
  • 5.4 comes with outdated xdebug 2.2.7, since it's end of life
Docker Pull Command
Source Repository