17 Aug 2018

Docker – Bitbucket Pipelines Ubuntu

Bitbucket Pipelines Docker image based on Ubuntu.

Packages installed

  • Node.js 8.11
  • NPM 5.6
  • Perl 5.22
  • PHP 7.2
    • bcmath,bz2,cgi,cli,common,curl,dev,enchant,fpm,gd,gmp,imap,interbase,intl,json,ldap,mbstring,mysql,odbc,opcache,pgsql,phpdbg,pspell,readline,snmp,sqlite3,sybase,tidy,xmlrpc,xsl,zip,xdebug
  • PHPUnit 5.7.27
  • Python 2.7
  • Ruby 2.3
  • Sencha CMD 6.5.3.6
  • Composer 1.6.5,
  • Other
    • apt-transport-https, bzip2, ca-certificates, clean-css-cli, curl, gettext, git, imagemagick, memcached, mysql-client, openjdk-7-jre, openssh-client, perl, python, python3, rsync, ruby, software-properties-common, subversion, unzip, uglify-js, wget, zip

Example - Build the image locally

git clone git@github.com:HendrikPrinsZA/bitbucket-pipelines-ubuntu.git && cd bitbucket-pipelines-ubuntu
docker build . --tag bitbucket-pipelines-ubuntu-local
docker run -it --volume=/var/www/html/project:/project --workdir="/project" --entrypoint=/bin/bash bitbucket-pipelines-ubuntu-local

Example - Remote image

docker run -it --volume=/var/www/html/project:/project --workdir="/project" --entrypoint=/bin/bash hendrikprinsza/bitbucket-pipelines-ubuntu

Example - Bitbucket Pipelines

pipelines:
  default:
    - step:
        image: hendrikprinsza/bitbucket-pipelines-ubuntu
        script:
          - phpunit --version
          - mysql -h127.0.0.1 -uroot -pthepassword123 -e "SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';"
        services:
          - mysql

definitions:
  services:
    mysql:
      image: mysql:5.6
      environment:
        MYSQL_DATABASE: test_database
        MYSQL_ROOT_PASSWORD: password123

Comments Off on Docker – Bitbucket Pipelines Ubuntu