Grabes / bitbucket-pipelines-php7

Docker image with PHP/Composer/MySQL/Node/Yarn for Bitbucket Pipelines

Home Page:https://hub.docker.com/r/edbizarro/bitbucket-pipelines-php7/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bitbucket Pipelines PHP 7.1 image

forthebadge

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

About

Docker image with PHP/Composer/MySQL/Node/Yarn for Bitbucket Pipelines

https://hub.docker.com/r/edbizarro/bitbucket-pipelines-php7/

License:MIT License