Public | Automated Build

Last pushed: 2 years ago
Short Description
Basic PHP development environment based on the official PHP 7 FPM image.
Full Description

Image description

Based on the official PHP 7 FPM image, this new flavour comes with:

  • Extensions: pdo, pdo_mysql, zip
  • Git & unzip
  • Composer (in path)

AND... optionally:

  • xdebug
  • blackfire
  • none or all of the above (see tag table below)

Additional tags will probably submerge.


debian alpine
xdebug, blackfire latest, debian-debug-blackfire alpine-debug-blackfire
xdebug debian-debug alpine-debug
blackfire debian-blackfire alpine-blackfire
none debian-vanilla alpine-vanilla

Overwritten WORKDIR- now at /var/www rather than the html subdirectory.

Example service/docker-compose.yml

Using the current directory as mountpoint

    image: sacredskull/php-7-fpm-development
      - .:/var/www
      - ./conf/php/php.ini:/usr/local/etc/php/conf.d/php.ini
      - "9000:9000"

Using Blackfire

To connect to a blackfire agent, just add the following service (replacing with your own values):

    image: blackfire/blackfire
      - BLACKFIRE_CLIENT_ID=yourclientID
      - BLACKFIRE_CLIENT_TOKEN=yourclienttoken
      - BLACKFIRE_SERVER_ID=yourserverID
      - BLACKFIRE_SERVER_TOKEN=yourservertoken

Remote interpreter in PHPSTORM

To use this as an interpreter you have a few options:

  • Craft a script file that executes the php container. If you're using compose.yml, make sure you force the container_name - then just run docker exec -it your_container_name php. This is easier said than done on Windows because of pathing issues.
  • Use an SSH container to gain access

SSH container

Replace the container variable with whatever you named your PHP container. Unfortunately, this doesn't currently work with Windows. See this issue for more details. Eventually, however, it should provide a cross-platform and easy to implement remote interpreter.

Your docker socket has to be mounted - this is a security risk - don't expose this publically.

    image: jeroenpeeters/docker-ssh
      - "2222:22"
      - /var/run/docker.sock:/var/run/docker.sock
      - CONTAINER=your_php_container_name
      - AUTH_MECHANISM=noAuth
Docker Pull Command