Docker Introduction - DevOps Montreal Meetup

2,492 views

Published on

Introduction to Docker, the open source Linux containers engine.
Presentation for the Montreal DevOps meetup on Jan 6, 2014.

Material, code, examples available at https://github.com/colinsurprenant/devopsmtl-docker

Published in: Technology
1 Comment
6 Likes
Statistics
Notes
No Downloads
Views
Total views
2,492
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
85
Comments
1
Likes
6
Embeds 0
No embeds

No notes for slide

Docker Introduction - DevOps Montreal Meetup

  1. 1. DevOps Montréal Colin Surprenant Jan 6, 2014 @colinsurprenant github.com/colinsurprenant/devopsmtl-docker
  2. 2. What is Docker? Open source engine that leverage LXC and AUFS to package an application and its dependencies in a virtual container that can run on any Linux server.
  3. 3. That was easy! Thank you! Good evening! LXC ?!
  4. 4. What is LXC? ● LinuX Containers ● Available since kernel 2.6.27 ● Not a new concept ○ ○ ○ ○ Linux VServer (BTW created by Jacques Gélinas, a Montrealer, in early 2000) OpenVZ FreeBSD Jails Solaris Zones
  5. 5. LXC ● Lightweight VM ○ own process space ○ own network interface ○ SHARE kernel with host ● Run Linux within Linux ● A container is a group of isolated processes ○ cgroups ○ namespace ● “chroot on steroid”
  6. 6. LXC vs VM
  7. 7. LXC Performance? Low overhead ● ● ● ● Isolated processes run straight on the host Native CPU performance Minimal memory overhead Minimal network performance overhead
  8. 8. So then, what is Docker? do
  9. 9. Docker ● Wrapper over LXC ● Tools to easily build images ● Images sharing ○ public repository: index.docker.io ○ private repository ● Docker daemon ○ manage containers & images ○ HTTP API ○ CLI tools
  10. 10. Containers, images & AUFS 1. RO images depends on parent images 2. Add AUFS RW layer 3. All layers + meta is a container
  11. 11. Why Docker? ● ● ● ● Containment and reproducibility Encapsulate app with its dependencies Run everywhere(™) Another step toward Immutable Infrastructure
  12. 12. Why Docker? ● No more missing dependencies in deployments ● Run side-by-side containers with own versions of dependencies
  13. 13. Separation of Concerns Developer DevOps Inside the container Outside the container ● ● ● ● ● ● ● ● ● my code my libraries my package manager my app my data logging remote access network configuration monitoring
  14. 14. Host Host Host Host Docker App container Docker service B container Docker service A container Docker App container service B container service A container Architecture
  15. 15. Some Consequences ● Services discovery & interconnection logic ● “Dockerized” services management/lifecycle ● Services data persistence and logging ● Path to The Twelve-Factors App
  16. 16. Requirements ● ● ● ● Linux kernel >= 3.8 AUFS LXC 64 bits ● Recommended ○ Ubuntu 12.04 with upgraded kernel ○ Ubuntu 13.04
  17. 17. Bro, I’m developing on a MacBook WTF MacBook what about Windows? shut up!
  18. 18. OSX? ● Virtualbox + Vagrant ● github.com/steeve/boot2docker ● Docker OSX native client (>= 0.7.3)
  19. 19. Typical Workflow
  20. 20. Demo github.com/colinsurprenant/devopsmtl-docker
  21. 21. Further Topics ● Deployment, orchestration, discovery ○ Container linking ○ Ambassador Container ■ docs.docker.io/en/latest/use/ambassador_pattern_linking/ ○ CoreOS ○ Shipyard ● PAAS ○ Dokku, Deis, Cocaine, Flynn ● Security
  22. 22. The end Thank You! Questions? Zzzzzzzz

×