version: '3.4'

x-php: &php
  volumes: ['.:/app', './docker/php/php.ini:/usr/local/etc/php/conf.d/php.ini']
  working_dir: '/app'

services:
  # PHP 5.3 contains neither mbstring extension nor docker-php-ext-install script
  # Original Dockerfile can be found here https://github.com/docker-library/php/pull/20/files
  # Unfortunately it fails to build now because GPG signatures do not exist anymore
  # php-5.3: { build: { context: docker/php-5.x, args: { PHP_VERSION: 5.3   } } }
  php-5.4: { <<: *php, build: { context: docker/php-5.x, args: { PHP_VERSION: 5.4   } } }
  php-5.5: { <<: *php, build: { context: docker/php-5.x, args: { PHP_VERSION: 5.5   } } }
  php-5.6: { <<: *php, build: { context: docker/php-5.x, args: { PHP_VERSION: 5.6   } } }
  php-7.0: { <<: *php, build: { context: docker/php,     args: { PHP_VERSION: 7.0   } } }
  php-7.1: { <<: *php, build: { context: docker/php,     args: { PHP_VERSION: 7.1.3 } } }
  php-7.2: { <<: *php, build: { context: docker/php,     args: { PHP_VERSION: 7.2   } } }
  php-7.3: { <<: *php, build: { context: docker/php,     args: { PHP_VERSION: 7.3   } } }
  php-7.4: { <<: *php, build: { context: docker/php,     args: { PHP_VERSION: 7.4   } } }
  php-8.0: { <<: *php, build: { context: docker/php,     args: { PHP_VERSION: 8.0   } } }
