Skip to content

Full featured PHP runner for PHP CI/CD builds & deployments.

Notifications You must be signed in to change notification settings

atymic/docker-php-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

PHP Runner

These docker images are meant for testing, building & deploying PHP code from CI tools that support docker images.
You shouldn't use the images to run production servers.

Versions

PHP 7.2

atymic/php72-runner Docker Cloud Build Status Docker Pulls

PHP 7.3

atymic/php73-runner Docker Cloud Build Status Docker Pulls

Using the image

Gitlab

This is an example Gitlab pipline. You'll probably need to customise it for your purposes

stages:
  - build
  - deploy

build:php:
  image: atymic/php73-runner
  stage: build
  script:
    - phpcs
    - phan # AST extension is installed
    - ./vendor/bin/phpunit # or use local version

deploy:
  stage: deploy
  image: atymic/php73-runner
  before_script:
    - ssh-add <(echo "$PRIVATE_KEY")
  script:
    - dep deploy production --tag=$CI_COMMIT_REF_NAME -vvv
  only:
    - master

Features

  • Pre-built with almost all extensions
  • Use composer github token to avoid rate limits ($COMPOSER_GITHUB)
  • Set container time zone ($TIMEZONE)
  • Optional Xdebug support (WITH_XDEBUG=true)
  • Node, NPM & Yarn installed (but you should use a dedicated image for building JS/CSS if possible)
  • Common PHP build, linting, analysis and deployment tools baked in:
    • phpunit
    • phpmd
    • php_codesniffer
    • phpstan
    • psalm
    • phan
    • deployer (& recipes)
  • Deployment tools (rsync, ssh-agent, git)

Credits

These images are based on ambroisemaupate's work.

Releases

No releases published

Sponsor this project

 

Packages

No packages published