We need a VM with Docker inside. Instructions are here:
Let's share the code in the Gist as well!
3 years old already
32K+ stars on GitHub
100K+ dockerized applications on Docker Hub
425M+ Docker Engine downloads
180+ Docker meetup groups in 50+ countries
1400+ community contributors
50K projects on GitHub using Docker
What is Docker?
Virtualization tool like VirtualBox?
Virtual machine manager like Vagrant?
Configuration management tool like Chef or Puppet?
cgroups , libvirt , LXC?
Open source engine to commoditize LXC (containers)
Build, pack, ship and run applications as containers
Build once, run in many places
Isolated and content agnostic
Available in modern kernels since 2008
Generically isolates resource usage (CPU, memory, disk, network)
Guarantees resources to application(s)
Can be adjusted on the fly
Isolating views of the system
Can make a process think it's the only process
Builtin way to "virtualize" processes
Docker is a simple client/server application
A Docker Client talks to Docker daemon, which executes the work
Docker Daemon also exposes RESTFul API, that can be used
Readonly templates from which containers are launched
Each image consists of series of layers using union file system
When image gets modified a new layer is created
Docker can also use additional file systems
Task 01 (start Docker container from
Get image from Docker Registry e.g. docker pull jenkins
List available images with docker images command.
Start your first container docker run jenkins command.
Press Ctrl+C to kill container.
Check that it's not running with docker ps command.
Run container in detached mode by passing ‐d option.
Expose port to access container from your host using ‐p option.
Task 02 (build an image from existing
Get aaconvert project from GitHub:
From project's directory run:
docker build ‐t aaconvert .
Start throwaway container to convert an image into ASCII art:
docker run ‐‐rm aaconvert
https://www.google.com/favicon.ico > docker.txt
Task 03 (build your own Docker image)
Create Dockerfile to build PetClinic application.
Application code is here:
Build Docker image with the help of:
docker build ‐‐tag=petclinic:1.0 .
Verify image is listed with docker images .
Task 03 (build your own Docker image)
Hint: command to build application is:
mvnw ‐e clean install tomcat7:help ‐DskipTests
Hint: command to run application is:
mvnw ‐e tomcat7:run ‐DskipTests
Task 04 (start Docker container from
Start container(s) with docker run petclinic:1.0 command.
Access container's process through its port ( 9966 ).
Kill container(s) with docker kill .
Remove container(s) with docker rm .
Remove image(s) with docker rmi .
Task 05 (start Docker environment with
Start MySQL server inside container:
‐p 3306:3306 mysql:5.7.8
Rebuild PetClinic image to use MySQL database (change pom.xml ).
Start PetClinic container using data from MySQL container.
Task 06 (use remote Docker Engine)
Configure DOCKER_HOST environment variable to use
Build images with unique ‐‐tag option to not conflict with other
Start containers on the remote host by exposing unique ports with ‐p
(available range is 8081‐8099 ) and naming containers with ‐‐name .
Play with docker ps and ‐‐filter to identify and kill only your
Training: DevOps MasterClass / Extreme
89 September, 2016
This 2day workshop focuses on solving challenges that organisations
face when implementing DevOps initiatives. It introduces principles of
DevOps and tools that help reach full automation of infrastructure
provisioning and software delivery. Theoretical background as well as
practical handson examples of tools like Vagrant, Docker, AWS and
others are given during this workshop.
Training: Effective Coding Principles and
Patterns in Java 8
1415 September, 2016
During this intensive, practical and entertaining 2day course you will
learn principles, practices and patterns for writing readable,
maintainable and effective code.