SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
Anil Wadghule
awadghule@equalexperts.com

February 2014 — Docker 0.8.0
Docker
•

Docker was started by Solomon Hykes as an internal project by
dotCloud

•

Docker makes Linux Containers easy to use
What is Docker?
“Docker is an open source engine to easily create lightweight,
portable, self-sufficient containers from any application. The same
container that a developer builds and tests on a laptop can run at
scale, in production, on VMs, bare metal, OpenStack clusters, public
clouds and more” - http://docker.io
Why Docker?
•

Deploy everything (webapps, backends, sql, big data, message
queues)

•

Deploy almost everywhere (Linux servers, VMs or bare metal, any
distro, Kernel 3.8)

•

Deploy reliably & consistently (local and on server same)

•

Deploy easily

•

Deploy at scale
Docker popularity
•

330+ Contributors,

•

50,000+ docker index pull,

•

1000’s of Dockerized applications

•

Integration in Jenkins, Travis, Chef, Puppet, Vagrant & OpenStack
The challenge
•

Static website, User DB, Queue, Background workers, Analytics DB,
API endpoint, Web Frontend

•

Development VM, QA Server, Public cloud, Production Servers,
Customer data center, Production cluster

•

Running apps in multiple environments results in N x N nightmare
Problem: shipping code

N x N compatibility nightmare
Solution

•

The Linux Container
This eliminated the N x N problem
What is LXC?
•

Lightweight Linux Container (LXC)

•

Operating system level virtualisation method for running multiple
isolated Linux systems

•

Provides way to run mini Linux systems within another Linux systems

•

http://en.wikipedia.org/wiki/LXC
LXC
•

I can SSH into it

•

I have root access

•

I can apt-get/yum install packages

•

Speed: boots in seconds

•

Footprint: 100-1000 containers on one machine. Small disk
requirements.
Control groups & namespaces
•

LXCs makes use of control groups & namespaces

•

Linux kernel feature to limit, account and isolate resource usage,
such as 

— CPU 

— Memory 

— Disk I/O
Docker
•

Docker is API on top of LXC

•

Docker runs as daemon

•

Docker makes Linux Containers easy to use (LXC)

•

Docker service exposes REST api that is used by Docker client
Docker architecture
DOCKER

LXC
LAYER FS
CGROUPS

LINUX KERNEL

NAMESPACES
Container vs. VMs
Docker operating system?
•

Doesn’t include operating system

•

Relies on operating system functionality provided by underlying
infrastructure
Requirements
•

Linux kernel 3.8 & above

•

AUFS

•

LXC

•

64-bit
Installation
•

Can be directly installed on supported Linux distros.

•

Supported Ubuntu versions



Ubuntu Precise 12.04 (LTS) (64-bit) 

Ubuntu Raring 13.04 and Saucy 13.10 (64 bit)
Installation: boot2docker
On Mac


•



$ brew install boot2docker

$ boot2docker init

$ boot2docker up

$ export DOCKER_HOST=tcp://

$ docker run -i -t busybox sh

#/
Installation: Vagrant
•

Clone the docker repository 

$ git clone https://github.com/dotcloud/docker.git

•

Startup the vagrant image 

$ vagrant up

•

SSH into the image 

$ vagrant ssh

•

Use docker in VM

$ docker

•

Vagrant client works on Mac
Demo
What Docker has done?
•

Downloaded the image from docker repo

•

Generated a new LXC container

•

Created a new file system

•

Mounted a read/write layer

•

Allocated network interface

•

Setup IP Setup NATing

•

Executed the bash shell in the container

•

** All under a very few minutes
Advantages
•

Elegant application delivery

•

Throwable sandboxes

•

Create uniform development & production environments

•

Automated testing and continuous integration/deployments

•

Deploying and scaling web apps, databases and backend services
Why developers care?
•

Build once, write everywhere

•

Clean, safe, hygienic and portable runtime environment for app

•

No worries about missing dependencies during subsequent
deployments

•

Reduce / eliminate compatibility concerns on different platforms
Recommended workflow
•

Each service will be in its own container(s)

•

Build an image for each service

•

Pin dependencies (packages etc.) accurately.

•

Link services together
Questions
Thank you !!!
Follow me on Twitter
@anildigital

Weitere ähnliche Inhalte

Was ist angesagt?

Continuous integration with Docker and Ansible
Continuous integration with Docker and AnsibleContinuous integration with Docker and Ansible
Continuous integration with Docker and Ansible
Dmytro Slupytskyi
 

Was ist angesagt? (20)

Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with docker
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker intro
Docker introDocker intro
Docker intro
 
docker installation and basics
docker installation and basicsdocker installation and basics
docker installation and basics
 
Continuous integration with Docker and Ansible
Continuous integration with Docker and AnsibleContinuous integration with Docker and Ansible
Continuous integration with Docker and Ansible
 
Docker
DockerDocker
Docker
 
Docker in real life
Docker in real lifeDocker in real life
Docker in real life
 
Dockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @TwitterDockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @Twitter
 
Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby
Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby
Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby
 
Docker Fundamentals
Docker FundamentalsDocker Fundamentals
Docker Fundamentals
 
Docker
DockerDocker
Docker
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Hero
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
DockerDay2015: Docker orchestration for developers
DockerDay2015: Docker orchestration for developersDockerDay2015: Docker orchestration for developers
DockerDay2015: Docker orchestration for developers
 
Docker Started
Docker StartedDocker Started
Docker Started
 
Docker - introduction
Docker - introductionDocker - introduction
Docker - introduction
 
Docker basics
Docker basicsDocker basics
Docker basics
 
Docker architecture-04-1
Docker architecture-04-1Docker architecture-04-1
Docker architecture-04-1
 
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
 

Ähnlich wie Docker

Intro to Docker November 2013
Intro to Docker November 2013Intro to Docker November 2013
Intro to Docker November 2013
Docker, Inc.
 
Intro to Docker - London meetup oct. 2013
Intro to Docker - London meetup oct. 2013Intro to Docker - London meetup oct. 2013
Intro to Docker - London meetup oct. 2013
stevedomin
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
dotCloud
 

Ähnlich wie Docker (20)

DockerCon EU 2015 Barcelona
DockerCon EU 2015 BarcelonaDockerCon EU 2015 Barcelona
DockerCon EU 2015 Barcelona
 
Cohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraCohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel Palstra
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the World
 
Docker from A to Z, including Swarm and OCCS
Docker from A to Z, including Swarm and OCCSDocker from A to Z, including Swarm and OCCS
Docker from A to Z, including Swarm and OCCS
 
Docker slides
Docker slidesDocker slides
Docker slides
 
Intro to Docker November 2013
Intro to Docker November 2013Intro to Docker November 2013
Intro to Docker November 2013
 
Docker.pptx
Docker.pptxDocker.pptx
Docker.pptx
 
Intro to Docker - London meetup oct. 2013
Intro to Docker - London meetup oct. 2013Intro to Docker - London meetup oct. 2013
Intro to Docker - London meetup oct. 2013
 
Docker open stack boston
Docker open stack bostonDocker open stack boston
Docker open stack boston
 
OpenStack Boston
OpenStack BostonOpenStack Boston
OpenStack Boston
 
The Docker Ecosystem
The Docker EcosystemThe Docker Ecosystem
The Docker Ecosystem
 
Docker lightning
Docker lightningDocker lightning
Docker lightning
 
Docker and Microservice
Docker and MicroserviceDocker and Microservice
Docker and Microservice
 
Docker
DockerDocker
Docker
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
 
Django and Docker
Django and DockerDjango and Docker
Django and Docker
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken Cochrane
 
Docker
DockerDocker
Docker
 
Docker in the Oracle Universe / WebLogic 12c / OFM 12c
Docker in the Oracle Universe / WebLogic 12c / OFM 12cDocker in the Oracle Universe / WebLogic 12c / OFM 12c
Docker in the Oracle Universe / WebLogic 12c / OFM 12c
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

Docker

  • 2. Docker • Docker was started by Solomon Hykes as an internal project by dotCloud • Docker makes Linux Containers easy to use
  • 3. What is Docker? “Docker is an open source engine to easily create lightweight, portable, self-sufficient containers from any application. The same container that a developer builds and tests on a laptop can run at scale, in production, on VMs, bare metal, OpenStack clusters, public clouds and more” - http://docker.io
  • 4. Why Docker? • Deploy everything (webapps, backends, sql, big data, message queues) • Deploy almost everywhere (Linux servers, VMs or bare metal, any distro, Kernel 3.8) • Deploy reliably & consistently (local and on server same) • Deploy easily • Deploy at scale
  • 5. Docker popularity • 330+ Contributors, • 50,000+ docker index pull, • 1000’s of Dockerized applications • Integration in Jenkins, Travis, Chef, Puppet, Vagrant & OpenStack
  • 6. The challenge • Static website, User DB, Queue, Background workers, Analytics DB, API endpoint, Web Frontend • Development VM, QA Server, Public cloud, Production Servers, Customer data center, Production cluster • Running apps in multiple environments results in N x N nightmare
  • 7. Problem: shipping code N x N compatibility nightmare
  • 9. This eliminated the N x N problem
  • 10. What is LXC? • Lightweight Linux Container (LXC) • Operating system level virtualisation method for running multiple isolated Linux systems • Provides way to run mini Linux systems within another Linux systems • http://en.wikipedia.org/wiki/LXC
  • 11. LXC • I can SSH into it • I have root access • I can apt-get/yum install packages • Speed: boots in seconds • Footprint: 100-1000 containers on one machine. Small disk requirements.
  • 12. Control groups & namespaces • LXCs makes use of control groups & namespaces • Linux kernel feature to limit, account and isolate resource usage, such as 
 — CPU 
 — Memory 
 — Disk I/O
  • 13. Docker • Docker is API on top of LXC • Docker runs as daemon • Docker makes Linux Containers easy to use (LXC) • Docker service exposes REST api that is used by Docker client
  • 16. Docker operating system? • Doesn’t include operating system • Relies on operating system functionality provided by underlying infrastructure
  • 17. Requirements • Linux kernel 3.8 & above • AUFS • LXC • 64-bit
  • 18. Installation • Can be directly installed on supported Linux distros. • Supported Ubuntu versions
 
 Ubuntu Precise 12.04 (LTS) (64-bit) 
 Ubuntu Raring 13.04 and Saucy 13.10 (64 bit)
  • 19. Installation: boot2docker On Mac
 • 
 $ brew install boot2docker
 $ boot2docker init
 $ boot2docker up
 $ export DOCKER_HOST=tcp://
 $ docker run -i -t busybox sh
 #/
  • 20. Installation: Vagrant • Clone the docker repository 
 $ git clone https://github.com/dotcloud/docker.git • Startup the vagrant image 
 $ vagrant up • SSH into the image 
 $ vagrant ssh • Use docker in VM
 $ docker • Vagrant client works on Mac
  • 21. Demo
  • 22. What Docker has done? • Downloaded the image from docker repo • Generated a new LXC container • Created a new file system • Mounted a read/write layer • Allocated network interface • Setup IP Setup NATing • Executed the bash shell in the container • ** All under a very few minutes
  • 23. Advantages • Elegant application delivery • Throwable sandboxes • Create uniform development & production environments • Automated testing and continuous integration/deployments • Deploying and scaling web apps, databases and backend services
  • 24. Why developers care? • Build once, write everywhere • Clean, safe, hygienic and portable runtime environment for app • No worries about missing dependencies during subsequent deployments • Reduce / eliminate compatibility concerns on different platforms
  • 25. Recommended workflow • Each service will be in its own container(s) • Build an image for each service • Pin dependencies (packages etc.) accurately. • Link services together
  • 27. Thank you !!! Follow me on Twitter @anildigital