SlideShare ist ein Scribd-Unternehmen logo
Why?
That eternal crap…!
(i.e Having no idea what’s wrong)
Passing on the headache!
Not the solution
Some use cases
• Solving dependency hell
• Configure once, run anywhere
• Continuous integration
• Create sandboxed app
• Run your own PaaS
So, what’s Docker
anyway?
Isolation Portability
Provisioning
Hypervisors/VM
Chef, Puppet, Ansible
Your app, libraries
Docker
Docker vs. VM
Hardware
Linux/Kernel
Container Container
Container Container
Container Container
Hardware
Linux/Kernel
VM
Linux/Kernel
VM
Linux/Kernel
VM
Linux/Kernel
VM
Linux/Kernel
Shared Resource, Lightweight,
Portable, Fast to boot
Dedicated Resource, Heavy, Not
portable, Comparatively slower boot
Under the Hood
LXC
Dream inside dream
inside dream….
(The Inception in Linux)
Namespaces
& cgroups
Isolated pid, net, uid….
Copy-on-
write
Filesystem
AUFS, btrfs, ZFS….
Installation
Do It Yourself
Docker Vocabulary
• Repository
• Image
• Tag
$ docker images ubuntu
REPOSITORY TAG IMAGE ID
ubuntu 10.04 9cc9ea5ea540
ubuntu 12.04 9cd978db300e
ubuntu 12.10 5ac751e8d623
ubuntu 13.04 eb601b8965b8
ubuntu 13.10 9f676bd305a4
ubuntu latest 9cd978db300e
ubuntu lucid 9cc9ea5ea540
ubuntu precise 9cd978db300e
ubuntu quantal 5ac751e8d623
ubuntu raring eb601b8965b8
ubuntu saucy 9f676bd305a4
Docker Vocabulary
• Registry $ docker pull ubuntu:12.04
Pulling repository ubuntu
c0fe63f9a4c1: Pulling dependent layers
511136ea3c5a: Download complete
6170bb7b0ad1: Download complete
79fdb1362c84: Downloading [===> ]56 MB/66.64 MB 10m9s
Docker Vocabulary
• Index $ docker login
Username: mehdi
Password:
Email: mehdi@team.okdo.it
Login Succeeded
Docker Vocabulary
• Container
$ docker run ubuntu:12.04 echo Hello World
Hello World
$ docker run -i -t ubuntu:12.04 /bin/bash
root@a09d485c9a9f:/# uname -a
Linux a09d485c9a9f 3.13.3-tinycore64 #1 SMP Wed
Mar 26 03:16:13 UTC 2014 x86_64 x86_64 x86_64
GNU/Linux
!
root@a09d485c9a9f:/#
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS !
f0638f0a1c7a ubuntu:12.04 /bin/bash 46 minutes ago Up 4 seconds
Tip: Press Ctrl+P
and Ctrl+Q to
detach running
containers
Docker Vocabulary
• Dockerfile $ cat Dockerfile
FROM ubuntu:12.04!
!
MAINTAINER Mehdi Hasan "mehdi@team.okdo.it"!
!
RUN apt-get -y install python-software-properties!
RUN add-apt-repository ppa:chris-lea/node.js!
RUN apt-get update!
RUN apt-get -y install python g++ make nodejs!
$ docker build -t mehdi/nodejs .
There is a
trailing dot
$ docker push mehdi/nodejs
Image c0fe63f9a4c1 already pushed, skipping
Image 5ff6986cd174 already pushed, skipping
Image 3867fae91348 already pushed, skipping
Image 4574f80c91e4 already pushed, skipping
Image 37c2cc34fa4e already pushed, skipping
757db77867dd: Image successfully pushed
Pushing tag for rev [757db77867dd] on {https://
registry-1.docker.io/v1/repositories/mehdi/nodejs/tags/
latest}
Any idea
why these
images are
skipped?
Container vs. Image!
Still Puzzled?
Running container from an image:
Creating image from a container:
$ docker ps -a!
$ docker commit -m “Image description"
<CONTAINER_ID> <USERNAME>/<REPO>
$ docker run -i -t ubuntu:12.04 /bin/bash
Lets see a Demo
Docker Workflow
Dev ProdRegistry
Public/Private
Demo
Deploying a sample app on the cloud using Docker
Your Next Weekend Fun Project:
Deploy something with Dokku
Dokku
Docker powered mini-Heroku in around 100 lines of Bash
See the demo here: http://vimeo.com/68631325
https://github.com/progrium/dokku
The rabbit hole goes deeper
than that…
• How to deal with data, logs, file uploads? Where to store?
Inside container? Inside host? Inside another container?



Hint: Read http://docs.docker.io/en/latest/use/
working_with_volumes/
• How to deal with distributed systems? 



Hint: Follow http://www.centurylinklabs.com/category/
docker-posts/
Keep following…
• https://coreos.com/
• http://www.confd.io/
• http://www.serfdom.io/
• http://www.dockerbook.com/ (Not yet released)*
* As of May, 2014
Docker cheat sheet
• https://gist.github.com/wsargent/7049221
• https://coderwall.com/p/2es5jw
Questions?

Weitere ähnliche Inhalte

Was ist angesagt?

Microservices. Microservices everywhere! (At OSCON 2015)
Microservices. Microservices everywhere! (At OSCON 2015)Microservices. Microservices everywhere! (At OSCON 2015)
Microservices. Microservices everywhere! (At OSCON 2015)
Jérôme Petazzoni
 

Was ist angesagt? (20)

Microservices. Microservices everywhere! (At OSCON 2015)
Microservices. Microservices everywhere! (At OSCON 2015)Microservices. Microservices everywhere! (At OSCON 2015)
Microservices. Microservices everywhere! (At OSCON 2015)
 
From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...
 
Perspectives on Docker
Perspectives on DockerPerspectives on Docker
Perspectives on Docker
 
Docker 初探,實驗室中的運貨鯨
Docker 初探,實驗室中的運貨鯨Docker 初探,實驗室中的運貨鯨
Docker 初探,實驗室中的運貨鯨
 
Azure container service docker-ha noi com
Azure container service   docker-ha noi comAzure container service   docker-ha noi com
Azure container service docker-ha noi com
 
A Hands-on Introduction to Docker
A Hands-on Introduction to DockerA Hands-on Introduction to Docker
A Hands-on Introduction to Docker
 
Docker 原理與實作
Docker 原理與實作Docker 原理與實作
Docker 原理與實作
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
The challenge of application distribution - Introduction to Docker (2014 dec ...
The challenge of application distribution - Introduction to Docker (2014 dec ...The challenge of application distribution - Introduction to Docker (2014 dec ...
The challenge of application distribution - Introduction to Docker (2014 dec ...
 
Docker by Example - Quiz
Docker by Example - QuizDocker by Example - Quiz
Docker by Example - Quiz
 
QNAP COSCUP Container Station
QNAP COSCUP Container StationQNAP COSCUP Container Station
QNAP COSCUP Container Station
 
First steps to docker
First steps to dockerFirst steps to docker
First steps to docker
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
 
Docker 101 @KACST Saudi HPC 2016
Docker 101  @KACST Saudi HPC 2016Docker 101  @KACST Saudi HPC 2016
Docker 101 @KACST Saudi HPC 2016
 
Learn docker in 90 minutes
Learn docker in 90 minutesLearn docker in 90 minutes
Learn docker in 90 minutes
 
Docker in production: reality, not hype (OSCON 2015)
Docker in production: reality, not hype (OSCON 2015)Docker in production: reality, not hype (OSCON 2015)
Docker in production: reality, not hype (OSCON 2015)
 
Docker Security: Are Your Containers Tightly Secured to the Ship?
Docker Security: Are Your Containers Tightly Secured to the Ship?Docker Security: Are Your Containers Tightly Secured to the Ship?
Docker Security: Are Your Containers Tightly Secured to the Ship?
 
Docker composeで開発環境をメンバに配布せよ
Docker composeで開発環境をメンバに配布せよDocker composeで開発環境をメンバに配布せよ
Docker composeで開発環境をメンバに配布せよ
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in development
 
Docker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XDocker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12X
 

Ähnlich wie Docker - Lightweight Virtualization

Docker and OpenStack at Rackspace
Docker and OpenStack at RackspaceDocker and OpenStack at Rackspace
Docker and OpenStack at Rackspace
Docker, Inc.
 
OpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQOpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQ
dotCloud
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize Django
Hannes Hapke
 

Ähnlich wie Docker - Lightweight Virtualization (20)

Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, OrchestrationThe Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystem
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014
 
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
 
Docker intro
Docker introDocker intro
Docker intro
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
 
Agile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: IntroductionAgile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: Introduction
 
Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortals
 
Docker 101
Docker 101 Docker 101
Docker 101
 
Containers without docker | DevNation Tech Talk
Containers without docker | DevNation Tech TalkContainers without docker | DevNation Tech Talk
Containers without docker | DevNation Tech Talk
 
Linux containers & Devops
Linux containers & DevopsLinux containers & Devops
Linux containers & Devops
 
Introduction To Docker
Introduction To DockerIntroduction To Docker
Introduction To Docker
 
Docker
DockerDocker
Docker
 
Docker and OpenStack at Rackspace
Docker and OpenStack at RackspaceDocker and OpenStack at Rackspace
Docker and OpenStack at Rackspace
 
OpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQOpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQ
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesDocker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los Angeles
 
Vagrant + Docker provider [+Puppet]
Vagrant + Docker provider [+Puppet]Vagrant + Docker provider [+Puppet]
Vagrant + Docker provider [+Puppet]
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize Django
 

Kürzlich hochgeladen

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Kürzlich hochgeladen (20)

Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxBuy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptx
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 

Docker - Lightweight Virtualization

  • 1.
  • 3. That eternal crap…! (i.e Having no idea what’s wrong)
  • 4. Passing on the headache! Not the solution
  • 5. Some use cases • Solving dependency hell • Configure once, run anywhere • Continuous integration • Create sandboxed app • Run your own PaaS
  • 8. Docker vs. VM Hardware Linux/Kernel Container Container Container Container Container Container Hardware Linux/Kernel VM Linux/Kernel VM Linux/Kernel VM Linux/Kernel VM Linux/Kernel Shared Resource, Lightweight, Portable, Fast to boot Dedicated Resource, Heavy, Not portable, Comparatively slower boot
  • 9. Under the Hood LXC Dream inside dream inside dream…. (The Inception in Linux) Namespaces & cgroups Isolated pid, net, uid…. Copy-on- write Filesystem AUFS, btrfs, ZFS….
  • 11. Docker Vocabulary • Repository • Image • Tag $ docker images ubuntu REPOSITORY TAG IMAGE ID ubuntu 10.04 9cc9ea5ea540 ubuntu 12.04 9cd978db300e ubuntu 12.10 5ac751e8d623 ubuntu 13.04 eb601b8965b8 ubuntu 13.10 9f676bd305a4 ubuntu latest 9cd978db300e ubuntu lucid 9cc9ea5ea540 ubuntu precise 9cd978db300e ubuntu quantal 5ac751e8d623 ubuntu raring eb601b8965b8 ubuntu saucy 9f676bd305a4
  • 12. Docker Vocabulary • Registry $ docker pull ubuntu:12.04 Pulling repository ubuntu c0fe63f9a4c1: Pulling dependent layers 511136ea3c5a: Download complete 6170bb7b0ad1: Download complete 79fdb1362c84: Downloading [===> ]56 MB/66.64 MB 10m9s
  • 13. Docker Vocabulary • Index $ docker login Username: mehdi Password: Email: mehdi@team.okdo.it Login Succeeded
  • 14. Docker Vocabulary • Container $ docker run ubuntu:12.04 echo Hello World Hello World $ docker run -i -t ubuntu:12.04 /bin/bash root@a09d485c9a9f:/# uname -a Linux a09d485c9a9f 3.13.3-tinycore64 #1 SMP Wed Mar 26 03:16:13 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux ! root@a09d485c9a9f:/# $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS ! f0638f0a1c7a ubuntu:12.04 /bin/bash 46 minutes ago Up 4 seconds Tip: Press Ctrl+P and Ctrl+Q to detach running containers
  • 15. Docker Vocabulary • Dockerfile $ cat Dockerfile FROM ubuntu:12.04! ! MAINTAINER Mehdi Hasan "mehdi@team.okdo.it"! ! RUN apt-get -y install python-software-properties! RUN add-apt-repository ppa:chris-lea/node.js! RUN apt-get update! RUN apt-get -y install python g++ make nodejs! $ docker build -t mehdi/nodejs . There is a trailing dot $ docker push mehdi/nodejs Image c0fe63f9a4c1 already pushed, skipping Image 5ff6986cd174 already pushed, skipping Image 3867fae91348 already pushed, skipping Image 4574f80c91e4 already pushed, skipping Image 37c2cc34fa4e already pushed, skipping 757db77867dd: Image successfully pushed Pushing tag for rev [757db77867dd] on {https:// registry-1.docker.io/v1/repositories/mehdi/nodejs/tags/ latest} Any idea why these images are skipped?
  • 16. Container vs. Image! Still Puzzled? Running container from an image: Creating image from a container: $ docker ps -a! $ docker commit -m “Image description" <CONTAINER_ID> <USERNAME>/<REPO> $ docker run -i -t ubuntu:12.04 /bin/bash Lets see a Demo
  • 18. Demo Deploying a sample app on the cloud using Docker
  • 19. Your Next Weekend Fun Project: Deploy something with Dokku Dokku Docker powered mini-Heroku in around 100 lines of Bash See the demo here: http://vimeo.com/68631325 https://github.com/progrium/dokku
  • 20. The rabbit hole goes deeper than that… • How to deal with data, logs, file uploads? Where to store? Inside container? Inside host? Inside another container?
 
 Hint: Read http://docs.docker.io/en/latest/use/ working_with_volumes/ • How to deal with distributed systems? 
 
 Hint: Follow http://www.centurylinklabs.com/category/ docker-posts/
  • 21. Keep following… • https://coreos.com/ • http://www.confd.io/ • http://www.serfdom.io/ • http://www.dockerbook.com/ (Not yet released)* * As of May, 2014
  • 22. Docker cheat sheet • https://gist.github.com/wsargent/7049221 • https://coderwall.com/p/2es5jw