My first day with Docker!

First Post

This is my first blog post in english and its possibility that I have a lot of grammatical errors.

The Compose file is a YAML file defining services, networks and volumes. Our proyect have four services (web, mysql, selenium, sparql )

Services/Containers The id of de containers can change but its alias never change. Inside /lib is the works custom.

Services

  1. Web: this container organize service apache, Its directories and configurations.
  2. MySQL: this container ornagaze service mysql, its directories and configurations.
  3. Sparql: this container have a database MySQL that maneges all Drupal’s taxonomies, subthemes, configurations.

Docker utility commands

  1. sudo chmod 666 /var/run/docker* -> permissions to the docker folder.
  2. docker-compose stop -> stop docker and its services.
  3. docker-compose up -d -> start docker and its services.
  4. docker ps -> it shows the status of all running process along theirs ID’s.
  5. docker inspect -> return slow-level information on Docker object, we get ip to proyect deploy.
  6. docker-compose exec web ./vendor/bin/run toolkit:install-clean -> Eject “toolkit:install-clean” in “./vendor/bin/”, this command installs our Drupal.
  7. docker-compose exec web composer install -> whithin the “Web” services we ejecute this command “composer install”.
  8. docker-compose exec web ./vendor/bin/drush sql-drop –yes -> Drop proyect database.
  9. docker-compose exec web ./vendor/bin/drush sql-create –yes -> Create proyect database.
  10. docker-compose exec -T web ./vendor/bin/drush sqlc < ./db/europass_dump.sql -> Load proyect database.
  11. docker-compose exec mysql /bin/bash -> open prompt mysql.
  12. docker cp ./europass_dump.sql $IDCONTAINER:/tmp/ -> cp dump to Mysql services.
  13. docker-compose exec mysql mysql -u root -p -> open Mysql
  14. docker system prune -f -> reset docker after “docker-compose stop”
  15. docker-compose exec web ./vendor/bin/drush cex -> drush config-export
  16. docker exec 2124abc05c6f /usr/bin/mysqldump -u root -p openeuropa_site > europass_dump1.sql -> export db

    Files of interest

  17. .env -> Enviroment variables, it values are availables to containers.
  18. ./docker-compose.yml. -> This is default path for a Compose file
Written on July 17, 2019