Sign inSign up

briteskies/magento-2-pipelines-docker

By briteskies

•Updated over 8 years ago

Build docker images for bitbucket pipelines. Tags associated with folders inside the master branch.

Image
0

693

briteskies/magento-2-pipelines-docker repository overview

⁠Magento 2 Docker (for Build Processes)

A collection of docker images designed specifically for building Magento 2 on Bitbucket Pipelines.

Build locally by running something along the lines of:

    docker build -t briteskies/magento-2-pipelines-docker:7.0-cli ./7.0-cli

Optionally login and push the image up instead of waiting for the automated build:

    docker login -u yourusername -p

Run the container locally for debugging with:

    sudo docker run -it briteskies/magento-2-pipelines-docker:7.0-cli bash
    # or to ignore the default entrypoint
    docker run -it --entrypoint "/bin/bash" briteskies/magento-2-pipelines-docker:7.0-cli

To debug pipelines builds locally:

  • run the following command install (changing the volume to site being tested)
  • docker run -it --entrypoint="/bin/bash" --volume=/var/www/smkw-m2:/srv/www --workdir="/srv/www" --memory=2048m briteskies/magento-2-pipelines-docker:7.0-cli
  • run the following in a separate terminal to start up mysql.
  • docker run -e "MYSQL_ROOT_PASSWORD=root" -e " MYSQL_DATABASE=magento2" -e "MYSQL_USER=magento2" -e "MYSQL_PASSWORD=magento2" mysql:5.7
  • run docker ps to find the name for the mysql container
  • run docker inspect name_of_the_container | grep IPAddress to get the IPAddress of the container
  • rename env.php in the project so it doesn't get used.
  • return to the terminal with the cli environment.
  • run rm -rf /srv/www/var/cache /srv/www/var/di /srv/www/var/generation /srv/www/var/page_cache
  • begin running a the calls from the bitbucket-pipelines.yml for the project.
    • Any environmental variables will need to be grabbed from the project settings in bitbucket.
  • Skip this instruction bash dev/tools/deployment/install-magento.sh from the pipelines files
  • You may need to connect to the mysql container as root to create the database magento2 form mysql workbench or similar
  • Run this using the ip address from the mysql container instead php -d memory_limit=2G ./bin/magento setup:install --db-host=172.17.0.3 --db-name=magento2 --db-user=root --db-password=root --base-url=http://localhost/ --admin-firstname=Test --admin-lastname=User [email protected] --admin-user=test --admin-password=magento2
  • continue running each command

References:

TODO:

  • Reorganize the this repository to go by magento version number instead of php version.

Installed

  • Elasticsearch 2.4.6 for < php 7.1
  • Elasticsearch 5.6.9 for >= php 7.1

Composer Global Packages

  • deployer/deployer
  • hirak/prestissimo

Tag summary

Content type

Image

Digest

Size

341.1 MB

Last updated

over 8 years ago

docker pull briteskies/magento-2-pipelines-docker:7.0-cli