SlideShare uma empresa Scribd logo
1 de 27
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with dockerLalatendu Mohanty
 
Docker introduction
Docker introductionDocker introduction
Docker introductionPhuc Nguyen
 
Docker intro
Docker introDocker intro
Docker introOleg Z
 
docker installation and basics
docker installation and basicsdocker installation and basics
docker installation and basicsWalid Ashraf
 
Continuous integration with Docker and Ansible
Continuous integration with Docker and AnsibleContinuous integration with Docker and Ansible
Continuous integration with Docker and AnsibleDmytro Slupytskyi
 
Dockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @TwitterDockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @TwitterdotCloud
 
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 Michelle Antebi
 
Docker Fundamentals
Docker FundamentalsDocker Fundamentals
Docker FundamentalsMien Dinh
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionRobert Reiz
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Herofazalraja
 
DockerDay2015: Docker orchestration for developers
DockerDay2015: Docker orchestration for developersDockerDay2015: Docker orchestration for developers
DockerDay2015: Docker orchestration for developersDocker-Hanoi
 
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...Lakmal Warusawithana
 

Mais procurados (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...
 

Semelhante a Docker

DockerCon EU 2015 Barcelona
DockerCon EU 2015 BarcelonaDockerCon EU 2015 Barcelona
DockerCon EU 2015 BarcelonaRoman Dembitsky
 
Cohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraCohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraDaniel Palstra
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the Worlddamovsky
 
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 OCCSFrank Munz
 
Intro to Docker November 2013
Intro to Docker November 2013Intro to Docker November 2013
Intro to Docker November 2013Docker, 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. 2013stevedomin
 
Docker open stack boston
Docker open stack bostonDocker open stack boston
Docker open stack bostondotCloud
 
Docker lightning
Docker lightningDocker lightning
Docker lightningroadster43
 
Docker and Microservice
Docker and MicroserviceDocker and Microservice
Docker and MicroserviceSamuel Chow
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionPeng Xiao
 
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 2013dotCloud
 
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 CochranedotCloud
 
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 12cFrank Munz
 

Semelhante a 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
 

Último

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 

Último (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 

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