Business Insider puts Docker at no. 22 on its list of 40 tech skills
that will land you a 120K plus salary. A good factoid to know if you are drivenby money. On the other hand, Docker's technology, is just flat out fun if you are a Linux techie, delight in good DevOps, or just like cutting-edge innovation. This talk covers both the fun and funds of Docker technology. You'll learn essential container concepts and see them in action. You'll also get practical
insight for applying container technology at your company.
2. Speaker introduction
• Documentation lead
• Been with Docker for over a
year
• Docker is my 9th startup
– Atlassian
– Palantir
– Ebay
– Tivoli
• Written technical documentation
• Designed & delivered training
• Co-founded a CRO
• Written web applications
• Designed user interfaces
• Build Doc Tools & Build
Processes
Mary Anthony
2
mary@docker.com
@moxiegirl on Github
@intsomniac on Twitter
3. Chick Lit
• The Broad Experience Podcast
http://www.thebroadexperience.com/
• Harvard Business Review (SEPTEMBER 2013 ISSUE)
https://hbr.org/2013/09/women-in-the-workplace-a-research-roundup
• What Works: Gender Equality by Design
Iris Bonnet
What Works shows what more can be
done―often at shockingly low cost and
surprisingly high speed.
3
4. Topics
• What is Docker?
• Why is container technology a big deal?
• Where to start when learning about Docker.
• Why business are looking to use Docker.
4
9. A History Lesson
One application on one physical server
In the Dark Ages
9
physical server
Host Operating System
Application
10. • Slow deployment times
• Huge costs
• Wasted resources
• Difficult to scale
• Difficult to migrate
• Vendor lock in
10
Limitations of application deployment in the dark ages
A History Lesson
physical server
Host Operating System
Application
11. A History Lesson
• One physical server can contain
multiple applications
• Each application runs in a virtual
machine (VM)
Introduction of hypervisor-based Virtualization
11
Host Operating System
Hypervisor
physical server
VM
Application
Guest
Operating
System
VM
Application
Guest
Operating
System
VM
Application
Guest
Operating
System
12. • Better resource pooling
– One physical machine divided into multiple virtual machines
• Easier to scale
• VM’s in the cloud
– Rapid elasticity
– Pay as you go model
12
Golden age of virtual machines
A History Lesson
13. • Each VM stills requires
– CPU allocation
– Storage
– RAM
– An entire guest operating system
• The more VM’s you run, the more resources you need
• Guest OS means wasted resources
• Application portability not guaranteed
13
Limitations of virtual machines
A History Lesson
14. Enter the new age of containers
• Each root file system is called a
container
• Each container also has its own
– Processes
– Memory
– Devices
– Network stack
14
Containers use the kernel of the host operating system to run multiple root
file systems.
physical OR virtual server
Host Operating System
OS Kernel
Container
Application
Container
Application
Container
Application
15. Container
Application
Container
Application
Container
Application
• Containers are lighter weight
• No need to install guest OS
• Less CPU, RAM, storage space required
• More containers per machine than VMs
Containers vs virtual machine’s
15
physical OR virtual server
Host Operating System
OS Kernel
Container
Application
Container
Application
Container
Application
Host Operating System
Hypervisor
physical server
VM
Application
Guest
Operating
System
VM
Application
Guest
Operating
System
VM
Application
Guest
Operating
System
16. • LXC is an operating-system-level virtualization that provides a virtual
environment
• Containers spin up as fast as a process
• The filesystem can be much smaller than a VM
• Are easily ported between machines
What makes containers lighter
16
20. Docker Engine
• Docker Engine is the
program that enables
containers
• Server - client architecture
• Engine daemon long-running
process manages Docker
resources
• Command line client wraps
the Engine REST API
20
21. Engine and the Linux Kernel
• Engine daemon runs on a
Linux operating system
• The machine where the
daemon is installed is a
Docker host
• You can install the CLI on the
same host but it can also be
on a different host
• Use the CLI to spawn
multiple containers
21
22. What is inside a container?
• own process space isolated from the host
• own network interfaces
• can run as root inside a container
• can install new packages
• can run services
22
A just-enough environment
23. What is inside a container?
23
• At base a minimal file-system distribution
• Ubuntu
• Debian
• Centos
• Can include lots more
• a process to run
• an application
• ports to expose
• data
A Docker image — a read-only template for instantiating a container
24. Where do images come from?
24
Docker Hub is the public
registry that contains a large
number of images available
for your use.
• Companies that want to
promote their software
• Users that want to enable
others
• You
26. Images and containers
26
• The container is your isolated application platform.
• You start a container from an image.
• You can modify the container with run options or after, while its running.
How to think about them
27. Other Docker resources
27
• By modifying the Engine daemon start options or using docker run options:
• Meter and/or limit on a container’s kernel resources (memory, cpu) using
cgroups
• Use namespaces to limit what a user / process can see in a container
• Choose a different storage driver to manage Docker images run inside a
container
• You can create networks of containers
• You can create data volumes that containers can share
Beyond just running an image
29. Recap the container lifecycle
• Basic lifecycle of a Docker container
– Create container from image
– Run container with a specified process
– Process finishes and container stops
– Destroy container
• More advanced lifecycle
– Create one or more containers from different image
– Run container with a specified process
– Interact and perform exchange data among a set of containers
– Stop the container
– Restart the container
29
Beyond just running an image
31. Why does business like container technology?
• Deployment on premise and in the cloud
• Easier configuration management among team members
• Big application broken into small services
• Reduce manual, unique complex deployment scenarios
• Services are decoupled, built iteratively and scaled out
• Scaling, load balancing, and monitoring are easier
31
Microservice architecture
32. The deployment nightmare
32
Do services and
apps interact
appropriately?
Can I migrate
quickly and
smoothly?
Multiple
development
stacks
Multiple
hardware
environments
34. The shipping container
34
Do I worry
about how
goods
interact? (i.e.
place coffee
beans next to
spices)
Can I
transport
quickly and
smoothy? (i.e
unload from
ship onto
train)
Multiple
types of
goods
Multiple
methods of
transportati
on
35. Docker containers
35
Do services
and apps
interact
appropriately?
Can I
migrate
quickly
and
smoothly?
Multiple
development
stacks
Multiple
hardware
environment
s
38. Provision your team or your cloud
• Provisions one, more, or many Engines
• May be on premise or in the cloud
• Supports multiple operating systems
• Enable developers on Windows or Mac to use
Docker products
38
Docker Machine
40. Develop on a single node
• Describe a container stack in a simple config file
• Start the stack with a single command
• Connect the containers within an overlay container network
• Aggregate logs
40
Docker Compose
42. Dynamic resource scaling
• Dispatch clusters of containers across multiple
Engine
• Speaks the Engine API
• Schedule containers using filters, metadata and
more
• Adds high availability features
• Combine with Compose
42
Docker Swarm
43. Docker technology
• Docker Hub
• Docker Cloud
• Docker Data Center
• Docker Commercially Supported Engine
• Docker Trusted Registry
• Docker Universal Control Plane
• Docker Registry
• Docker Notary
43
And more still…
44. Take aways
• Docker is a company name and its is synonymous with container
technology.
• Containers are quickly replacing virtual machines because the enable
more efficient resource usr.
• Docker Engine enables all Docker technology; start with Engine first
when learning.
• Containers are created from images.
• Images describe application configurations.
• Container technology enables microservice architectures the new
business it word.
44