5. Where did you hear about Docker ?
https://medium.com/aws-activate-startup-blog/using-containers-to-build-a-microservices-architecture-6e1b8bacb7d1#.8i6rqwmf3
16. WHAT IS DOCKER ?
Docker containers wrap up a piece of
software in a complete filesystem that
contains everything it needs to run:
code, runtime, system tools, system
libraries – anything you can install on a
server
17. Why Developers Care
◼ Build once…(finally) run anywhere*
◼ A clean, safe, hygienic and portable runtime environment for your app.
◼ No worries about missing dependencies, packages and other pain points during subsequent
deployments.
◼ Run each app in its own isolated container, so you can run various versions of libraries and other
dependencies for each app without worrying
◼ Automate testing, integration, packaging…anything you can script
◼ Reduce/eliminate concerns about compatibility on different platforms, either your own or your
customers.
◼ Cheap, zero-penalty containers to deploy services? A VM without the overhead of a VM? Instant replay
and reset of image snapshots? That’s the power of Docker
Source: dotcloud.com
18. Why Devops Cares?
◼Configure once…run anything
◼ Make the entire lifecycle more efficient, consistent, and repeatable
◼ Increase the quality of code produced by developers.
◼ Eliminate inconsistencies between development, test, production, and customer environments
◼ Support segregation of duties
◼ Significantly improves the speed and reliability of continuous deployment and continuous integration
systems
◼ Because the containers are so lightweight, address significant performance, costs, deployment, and
portability issues normally associated with VMs
Source: dotcloud.com
19. Why it works—separation of concerns
◼ Dan the Developer
◼ Worries about what’s “inside” the
container
◼ His code
◼ His Libraries
◼ His Package Manager
◼ His Apps
◼ His Data
◼ All Linux servers look the same
• Oscar the Ops Guy
• Worries about what’s “outside” the
container
• Logging
• Remote access
• Monitoring
• Network config
• All containers start, stop, copy,
attach, migrate, etc. the same way
20. More technical explanation
◼ High Level—It’s a lightweight VM
◼ Own process space
◼ Own network interface
◼ Can run stuff as root
◼ Can have its own /sbin/init
(different from host)
◼ <<machine container>>
• Low Level—It’s chroot on steroids
• Can also not have its own
/sbin/init
• Container=isolated processes
• Share kernel with host
• No device emulation (neither
HVM nor PV) from host)
• <<application container>>
• Run everywhere
• Regardless of kernel version
(2.6.32+)
• Regardless of host distro
• Physical or virtual, cloud or not
• Container and host architecture
must match*
• Run anything
• If it can run on the host, it can run
in the container
• i.e. if it can run on a Linux kernel,
it can run
WHY WHAT
21. Containers vs. VMs
App
A
Hypervisor (Type 2)
Host OS
Server
Guest
OS
Bins/
Libs
App
A’
Guest
OS
Bins/
Libs
App
B
Guest
OS
Bins/
Libs
AppA’
Docker
Host OS
Server
Bins/Libs
AppA
Bins/Libs
AppB
AppB’
AppB’
AppB’
VM
Container
Containers are isolated,
but share OS and, where
appropriate, bins/libraries
Guest
OS
Guest
OS
…result is significantly faster deployment,
much less overhead, easier migration,
faster restart
22. What is a container?
In 4 bullet points:
◼Containers share the host kernel
◼Containers use the kernel ability to group processes for resource control
◼Containers ensure isolation through namespaces
◼Containers feel like lightweight VMs (lower footprint, faster), but are not Virtual
Machines!
Source: http://docker-saigon.github.io/post/Docker-Internals/
23. Why are Docker containers lightweight?
Bins/
Libs
App
A
Original App
(No OS to take
up space, resources,
or require restart)
AppΔ
Bins/
App
A
Bins/
Libs
App
A’
Guest
OS
Bins/
Libs
Modified App
Copy on write
capabilities allow
us to only save the diffs
Between container A
and container
A’
VMs
Every app, every copy of an app, and every slight
modification of the app requires a new virtual server
App
A
Guest
OS
Bins/
Libs
Copy of
App
No OS. Can
Share bins/libs
App
A
Guest
OS
Guest
OS
VMs Containers
25. Docker Engine
◼Core of the Docker platform
◼Runs on Linux to create the
operating environment for your
distributed applications
◼in-host daemon communicates
with the Docker client to execute
commands to build, ship and run
containers
27. Docker Registry
There are 3 choices for use of a Registry:
◼A Public Cloud-hosted registry. The Docker Hub is
the default registry used by the docker client and
source of Officially maintained Docker images
◼An On-premise registry, through the
commercially offered Trusted Docker Registry
◼A Self-hosted registry based on the official Open
Source Docker Registry.
30. Docker Machine
You can use Docker Machine to:
◼Install and run Docker on Mac or Windows
◼Provision and manage multiple remote Docker hosts
◼Provision Swarm clusters
42. Building a Continuous Integration Pipeline with Docker
https://sreeninet.wordpress.com/2016/01/23/ci-cd-with-docker-jenkins-and-tutum/
43. Build a micro service with Docker
A Docker –Hanoi’s Scenario:
◼At the beginning, Service #1 only runs in Node 2.
◼After that Service #1 scales to Node 2
◼Via Docker API, Registrator will know the appearance of Service #1 on Node
2.
◼Registrator will register Service #1 with Consul.
◼In the meanwhile, Consul-Template in listening Consul. So Consul-
Template will know the new service is up in Node 2. Finally, Consul-
Template will trigger a reload command to Nginx add the new service into
load balancer.
https://www.facebook.com/events/986704731366039/