Docker Learning Course
Duration: Two weeks, three days per each week, 1 hour per day
Learning Docker
Inception with Docker basics
- Container execution and deatached execution
- Images
- Layers
- Tags
- Docker public registry
- Builds
- Dockerfile
- Build, commit, push
- CMD and ENTRYPOINT differences
- Pets vs Cattle
- Docker Development Flow
Reference repositories:
- Daniele Siddi's GitHub - Curso de introducción a Docker
- CMD vs ENTRYPOING in Stackoverflow
- Brian DeHamer - Dockerfile ADD vs COPY
Docker Elements
- Containers
- Images
- Networks
- Volumes
Refertence repositories:
- Red Panda CI's GitHub - Jenkins Workshop
- Moncho's Github - DRY (container management CLI)
Docker Compose
- Docker compose file
- Parameters with .env
- Platform definition and usage
- Real examples with live projects
Reference repositories:
- Sergio Ortega Gome's GitHub - Symfony 4 App Example
External resources:
- Dockerfile linter resource - FROM:latest
Using Docker
Docker compose in real projects
Reference repositories: none that we can share :)
Choose one of the following options
- Docker in Docker
- Ubuntu DIND
- Official Docker in Docker
- Quality pieces with Docker
- Jenkins in Docker
- Sonar with real live project
- Zalenium: Selenium Grid with steroids in Docker
- Windows in Docker
Reference repositories:
- Jerôme Petazzoni - Using Docker in Docker
- Red Panda CI's GitHub
- Ayuda Digital
- Informática Parmadux's GitHub - Odoo
- Docker - Docker in Docker
- Zalando IT's GitHub - Zalenium
- Aerokube's GitHub - Windows Images
Put Docker on the Spring Boot Angular4 Heroes sample application.
Stages:
- Follow the instructions of the project and install on your workstation or laptop all the stuff to execute the application.
- Build a docker-compose platform in two services: database and application.
- Compare with the Kairops Fork of the project and the solution proposed here. Don't cheat and look only when you are finished the sedond stage.
Tips:
- Use MySQL 5.x or MariaDB 5.x versions for the database service.
- Use debian based image for the application service.
- Add
--disable-host-check
and--host 0.0.0.0
parameters for theng start
command.
Top goal:
- Try to split the application in two Docker services: backend and frontend.
Choose one of the following options
Use the project Duing to dessign and execute a BDD test
Demonstrate how we can use Docker to run a complete linux Desktop environment with all the tools needed to materialize complex tasks.
Reference repositories:
- Ayuda Digital's GitHub - Docker Ubuntu INstant Gherkin
- Sergio Ortega Gomez's GitHub - Docker Ubuntu 18.10 Mate Desktop
Take a look at Kubernetes using local minikube and this Docker Compose Example project.
Thanks to Álvaro for this work.
- General Concepts about Software Development (Spanish)
- Play with Docker
- Learning Docker with Katacoda courses
You can download the whole Docker images and clone the whole referenced repositories with a script within the project.
Execute the command:
devcontrol/actions/install-stuff.sh exec
...or use devcontrol install-stuff
if you have Devcontrol installed on your system) and wait for the script to finish.
Find in the bdd-examples
directory of the repository some examples of BDD test created as part of the day 6 session.
To execute the tests:
-
Start a
duing
container with the repository shared as volume within it.docker run --name duing \ -p 3389:3389 \ --shm-size 1g \ -dit --restart unless-stopped \ -v $(pwd):/opt/docker-learning \ ayudadigital/duing
-
Copy the
/opt/docker-learning/bdd-examples/test/
directory in/opt/duingdemo/ci-scripts/test/
. This will add the examples to thefeatures
directory.$ docker exec -u ubuntu duing cp -rv /opt/docker-learning/bdd-examples/test/ /opt/duingdemo/ci-scripts/ '/opt/docker-learning/bdd-examples/test/cucumber/features/step_definitions/bddfire_steps.rb' -> '/opt/duingdemo/ci-scripts/test/cucumber/features/step_definitions/bddfire_steps.rb' '/opt/docker-learning/bdd-examples/test/cucumber/features/github_search.feature' -> '/opt/duingdemo/ci-scripts/test/cucumber/features/github_search.feature'
-
Follow the instructions of the Duing project.
Take care that github can't be tested with PhantomJS, so the
rake poltergeist
command will end with an error.ubuntu@7a0e1ec3060f:/opt/duingdemo/ci-scripts/test/cucumber$ rake poltergeist /usr/bin/ruby2.5 -S bundle exec cucumber features -p poltergeist --format pretty --profile html -t ~@api {"baseurl"=>"https://www.google.es", "take_screenshots"=>false, "screenshot_delay"=>1, "browser_width"=>1024} Using the poltergeist and html profiles... Feature: Google Search to explore BDDfire Scenario: View home page # features/bddfire.feature:4 Given I am on "http://www.google.com?hl=en" # bddfire-3.0.2/lib/bddfire/web/web_steps.rb:2 When I fill in "q" with the text "bddfire" # bddfire-3.0.2/lib/bddfire/web/web_steps.rb:6 Then I should see "Sign in" # bddfire-3.0.2/lib/bddfire/web/web_steps.rb:10 Feature: Github search for a library Scenario: Search library within github # features/github_search.feature:3 Given I am on "https://www.github.com" # bddfire-3.0.2/lib/bddfire/web/web_steps.rb:2 Request to 'https://www.github.com' failed to reach server, check DNS and/or server status (Capybara::Poltergeist::StatusFailError) features/github_search.feature:4:in `Given I am on "https://www.github.com"' When I fill in "Search GitHub" with the text "vavr" # bddfire-3.0.2/lib/bddfire/web/web_steps.rb:6 And I press intro key with my little finger # features/step_definitions/bddfire_steps.rb:3 Failing Scenarios: cucumber -p poltergeist -p html features/github_search.feature:3 # Scenario: Search library within github 2 scenarios (1 failed, 1 passed) 6 steps (1 failed, 2 skipped, 3 passed) 0m1.410s