Skip to content

Latest commit

 

History

History
executable file
·
72 lines (59 loc) · 3.31 KB

docker-environment.md

File metadata and controls

executable file
·
72 lines (59 loc) · 3.31 KB

Using Docker environment

Using Git hooks User guide NextEuropa Toolkit

Upgrade screencast

The toolkit comes with a docker environment that can help you set up your project much faster. This feature is still experimental and in progress. You can watch a very short screencast on how to use this docker environment. It makes use of a docker-compose.yml with custom FPFIS images. If the provided docker-compose.yml does meet your needs we advise you to customize it.

How it works

Executing the dbash file with up -d will assign your environment a unique id and symlink a file from your root to the dbash file. This way you can keep track of your environments and know which one to access.

execute ./vendor/ec-europa/toolkit/includes/docker/dbash up -d

Creating network "5660526056154745951df82537e1f1cf_default" with the default driver
Creating 5660526056154745951df82537e1f1cf_mysql_1 ...
Creating 5660526056154745951df82537e1f1cf_mysql_1
Creating 5660526056154745951df82537e1f1cf_selenium_1 ...
Creating 5660526056154745951df82537e1f1cf_solr_1 ...
Creating 5660526056154745951df82537e1f1cf_solr_1
Creating 5660526056154745951df82537e1f1cf_selenium_1 ... done
Creating 5660526056154745951df82537e1f1cf_web_1 ...
Creating 5660526056154745951df82537e1f1cf_web_1 ... done

To access your environment you can execute the symlink file which is just a connection between the host and your docker containers. The syntax to use after the script is regular docker-compose. If you are accessing the web service you can keep the host user and group id by executing your command with the web user.

execute ./docker-56605260-5615-4745-951d-f82537e1f1cf exec --user web web ./toolkit/drush status

 PHP executable         :  /usr/bin/php
 PHP configuration      :  /etc/php.ini
 PHP OS                 :  Linux
 Drush script           :  /home/user/ec-europa/toolkit/vendor/drush/drush/drush.php
 Drush version          :  8.0.5
 Drush temp directory   :  /tmp
 Drush configuration    :
 Drush alias files      :

If you are ready using the environment you should clean up afterwards. This can be accomplished with the down command. It will stop and remove all containers that are part of the project id.

execute ./docker-56605260-5615-4745-951d-f82537e1f1cf down

Stopping 5660526056154745951df82537e1f1cf_web_1 ... done
Stopping 5660526056154745951df82537e1f1cf_selenium_1 ... done
Stopping 5660526056154745951df82537e1f1cf_solr_1 ... done
Removing 5660526056154745951df82537e1f1cf_web_1 ... done
Removing 5660526056154745951df82537e1f1cf_selenium_1 ... done
Removing 5660526056154745951df82537e1f1cf_solr_1 ... done
Removing 5660526056154745951df82537e1f1cf_mysql_1 ... done
Removing network 5660526056154745951df82537e1f1cf_default