Public | Automated Build

Last pushed: 2 months ago
Short Description
Docker image to test PHP on Bitbucket Pipelines with PHP/Composer/MySQL/Node/Yarn
Full Description

Bitbucket Pipelines PHP 7.1 image

Based on Official PHP image

Packages installed

  • PHP 7.1 with mcrypt, mongod, xdebug, zip, xml, mbstring, curl, json, imap, mysql, iconv, gd, pdo_mysql, opcache, intl. zip, bcmath and tokenizer
  • Composer
  • Node 8.x / NPM / Gulp / Yarn
  • Mysql 5.7

Why install MySQL in the image?

The Bitbucket pipeline don't support MySQL as service, like many others solutions out there (like Gitlab), so, the solution is to install MySQL and start the service in pipeline run

bitbucket-pipelines.yml example

image: edbizarro/bitbucket-pipelines-php7
pipelines:
  default:
    - step:
        script:
          - sudo service mysql start # We need this here because bitbucket don't have MySQL service :/
          - mysql -h localhost -u root -proot -e "CREATE DATABASE test;"
          - composer install --no-interaction --no-progress --prefer-dist
          - yarn
          - gulp
          - ./vendor/phpunit/phpunit/phpunit -v --coverage-text --colors=never --stderr
Docker Pull Command
Owner
edbizarro