SlideShare a Scribd company logo
1 of 21
Docker: The Linux container
Name: BalajiRajan
Date: 29-Sep-2013
Event:http://www.meetup.com/devops-bangalore
What is docker?
Docker is a tool created by the folks at dotCloud to make
using LinuX Containers (LXC) easier to use.
Linux Containers are basically light weight Virtual Machines
(VM). A linux container runs Unix processes with strong
guarantees of isolation across servers.
Your software runs repeatably everywhere because its
Container includes all of its dependencies.
LXC
 Lxc is an operating system-level virtualization method for
running multiple isolated Linux systems (containers) on a
single control host.
 Basicaly, LXC provides a way to run mini operating
systems in your host operating system.
What about VM?
● Any virtualization technologies such as KVM, Hypervisor
and Xen..etc, which started by booting separate virtual
systems on emulated hardware, and then new vm runs
as a full fledged OS and uses isolated process spaces.
● But Docker runs with Host Operating system as its
share the host process spaces.
Docker vs VMs
Docker Vs VMs
 Size:
VMs are very large which makes them
impractical to store and transfer.
VM: You have a container image that is 1GB in size. If
you wanted to use a Full VM, you would need to have
1GB times x number of VMs you want.
Docker: With LXC you can share the bulk of the 1GB. It
means that If you have 1000 containers you still might
only have a little over 1GB of space for the containers
OS, assuming they are all running the same OS image.
Docker Vs VMs
 Resource Utilization: (CPU & RAM)
VM: A full virtualized system gets it's own set of
resources allocated to it, and does minimal sharing. You
get more isolation, but it is much heavier and requires
more resources.
Docker: With LXC you get less isolation, but they are
more lightweight and require less resources.
Docker Vs VMs
 Performance:
VM: A full virtualized system usually takes minutes to
start.
Docker: LXC containers take seconds, and most times
less then a second.
Docker's Advantage
 Throwable Sandboxes: Create a container in a minute
to test your stuffs and tear it down.
 Fine Application Delivery: Containers allow you to
package just about any application. You could add the
dependencies of the application in the container itself.
Ex: mysql service.
 Reusability: Docker makes containers reusbale.
 Uniformity: Development and production Environments.
Installing Docker
* Docker is still under heavy development! Don’t
recommend using it in production yet.
* Right now, the officially supported distributions are:
* Ubuntu Precise 12.04 (LTS) (64-bit)
* Ubuntu Raring 13.04 (64 bit)
Installing Docker
Requirement:
* Kernel version: greater then 3.8 and Cgroups and
namespaces must be enabled.
* AUFS: AUFS is included in the kernels built by the
Debian and Ubuntu distributions.
* LXC:
Installation method
* Source
* compiled binary
* package manager
Installing Docker
# Add the Docker repository to your apt sources list.
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main >
/etc/apt/sources.list.d/docker.list"
# Update your sources
sudo apt-get update
# Install, lxc-docker
sudo apt-get install lxc-docker
# download the base 'ubuntu' container and run bash inside it
#while setting up an interactive shell
sudo docker run -i -t ubuntu /bin/bash
Installing Docker
# docker version
Client version: 0.4.8
Server version: 0.4.8
# docker info
Containers: 0
Images: 0
WARNING: No memory limit support
WARNING: No swap limit support
Terminalogy
* Image
An image is a read only layer used to build a container. They
do not change.
* Container
Is basically a self contained runtime environment that is
built using one or more images. You can commit your
changes to a container and create an image.
* Docker index / registry
These are public or private servers where people can upload
their repositories so they can easily share what they made.
Creating container
balaji@devops$ docker run -i -t ubuntu:12.04
/bin/bash
$ cat /etc/issue
Ubuntu 12.04 n
$
Lets see what docker is doing here.
1. Downloaded the image from docker repo.
2. Generated a new LXC container.
3. Created a new file system.
4. Mounted a read/write layer.
5. Allocated network interface.
6. Setup IP.
7. Setup NATing.
8 Executed the bash shell in the container.
*****All in under a very few minutes *********
Work with CLI:
* List Images:
$ docker images
REPOSITORY TAG ID CREATED SIZE
base latest b750fe79269d 3 months ago 24.65 kB
(virtual 180.1 MB)
base ubuntu-12.10 b750fe79269d 3 months ago 24.65 kB
(virtual 180.1 MB)
base ubuntu-quantal b750fe79269d 3 months ago 24.65 kB
(virtual 180.1 MB)
base ubuntu-quantl b750fe79269d 3 months ago 24.65 kB
(virtual 180.1 MB)
*List Containers:
$ docker ps -a
ID IMAGE COMMAND CREATED STATUS
PORTS
861361e27501 base:latest /bin/echo hello world 1 minutes ago Exit 0
Docker Index/registry
The Docker Registry is server that stores all of the
images and repositories. The Index just has the metadata
about the images, repositories and the user accounts, but
all of the images and repositories are stored in the
Docker Registry.
$ docker login
Username (): myusername
Password:
Email ():
myusername@example.com
Login Succeeded
Work with CLI:
Important commands:
* docker run base /bin/echo hello world
* docker commit <id>
* docker attach <id>
* docker pull / push <id>
* docker inspect <id>
* docker diff <id>
* docker stop/start <id>
* docker rmi `docker images -a -q` - remove images
* docker rm `docker ps -a -q` - remove container
More Projects are coming on the way...
● http://blog.docker.io/2013/07/docker-projects-from-the-docker-co
Important Projects:
* Building Docker on Openstack with Vagrant
* DockerUI – Web interface
* Openstack-Docker
* chef-docker - Installs/Configures Docker
* Puppet module for installing Docker
* dockermix – A command line tool to build and manage
multi-container docker environments
●
References:
1. docker.io
2. https://github.com/dotcloud/docker
3. http://kencochrane.net/blog/

More Related Content

What's hot

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 — SCALE12XJérôme Petazzoni
 
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12dotCloud
 
Docker, the Future of DevOps
Docker, the Future of DevOpsDocker, the Future of DevOps
Docker, the Future of DevOpsandersjanmyr
 
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
 
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16 What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16 Docker, Inc.
 
Basic docker for developer
Basic docker for developerBasic docker for developer
Basic docker for developerWeerayut Hongsa
 
OpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQOpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQdotCloud
 
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQIntroduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQdotCloud
 
Docker introduction
Docker introductionDocker introduction
Docker introductionPhuc Nguyen
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionPeng Xiao
 
Docker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registryDocker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registrydotCloud
 
Intro Docker october 2013
Intro Docker october 2013Intro Docker october 2013
Intro Docker october 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
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerJohn Willis
 
Introduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and DockerIntroduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and DockerChris Taylor
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionHao Fan
 
Docker Introduction + what is new in 0.9
Docker Introduction + what is new in 0.9 Docker Introduction + what is new in 0.9
Docker Introduction + what is new in 0.9 Jérôme Petazzoni
 

What's hot (20)

Docker - introduction
Docker - introductionDocker - introduction
Docker - introduction
 
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
 
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Docker, the Future of DevOps
Docker, the Future of DevOpsDocker, the Future of DevOps
Docker, the Future of DevOps
 
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
 
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16 What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
 
Basic docker for developer
Basic docker for developerBasic docker for developer
Basic docker for developer
 
OpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQOpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQ
 
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQIntroduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registryDocker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registry
 
Docker From Scratch
Docker From ScratchDocker From Scratch
Docker From Scratch
 
Intro Docker october 2013
Intro Docker october 2013Intro Docker october 2013
Intro Docker october 2013
 
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
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Introduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and DockerIntroduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and Docker
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker Introduction + what is new in 0.9
Docker Introduction + what is new in 0.9 Docker Introduction + what is new in 0.9
Docker Introduction + what is new in 0.9
 

Viewers also liked

Why Docker
Why DockerWhy Docker
Why DockerdotCloud
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker, Inc.
 
Docker introduction
Docker introductionDocker introduction
Docker introductiondotCloud
 
KVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStackKVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStackBoden Russell
 
A Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things ContainersA Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things ContainersJérôme Petazzoni
 
Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker, Inc.
 
Docker and Go: why did we decide to write Docker in Go?
Docker and Go: why did we decide to write Docker in Go?Docker and Go: why did we decide to write Docker in Go?
Docker and Go: why did we decide to write Docker in Go?Jérôme Petazzoni
 
Online Meetup: What's new in docker 1.13.0
Online Meetup: What's new in docker 1.13.0 Online Meetup: What's new in docker 1.13.0
Online Meetup: What's new in docker 1.13.0 Docker, Inc.
 
Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)Boden Russell
 
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화OpenStack Korea Community
 
Lxd the proper way of runing containers
Lxd   the proper way of runing containersLxd   the proper way of runing containers
Lxd the proper way of runing containersMarian Marinov
 
Container as a Service with Docker
Container as a Service with DockerContainer as a Service with Docker
Container as a Service with DockerPatrick Chanezon
 
Infinit: Modern Storage Platform for Container Environments
Infinit: Modern Storage Platform for Container EnvironmentsInfinit: Modern Storage Platform for Container Environments
Infinit: Modern Storage Platform for Container EnvironmentsDocker, Inc.
 
Containerd - core container runtime component
Containerd - core container runtime component Containerd - core container runtime component
Containerd - core container runtime component Docker, Inc.
 
containerd and CRI
containerd and CRIcontainerd and CRI
containerd and CRIDocker, Inc.
 
OpenStack Tutorial
OpenStack TutorialOpenStack Tutorial
OpenStack TutorialBret Piatt
 
Docker Online Meetup: Announcing Docker CE + EE
Docker Online Meetup: Announcing Docker CE + EEDocker Online Meetup: Announcing Docker CE + EE
Docker Online Meetup: Announcing Docker CE + EEDocker, Inc.
 
Openvz booth
Openvz boothOpenvz booth
Openvz boothOpenVZ
 
Docker - Build, Ship and Run Any App, Anywhere Hollywood edition
Docker - Build, Ship and Run Any App, Anywhere Hollywood editionDocker - Build, Ship and Run Any App, Anywhere Hollywood edition
Docker - Build, Ship and Run Any App, Anywhere Hollywood editionBrian Christner
 
Dchug m7-30 apr2013
Dchug m7-30 apr2013Dchug m7-30 apr2013
Dchug m7-30 apr2013jdfiori
 

Viewers also liked (20)

Why Docker
Why DockerWhy Docker
Why Docker
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
KVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStackKVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStack
 
A Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things ContainersA Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things Containers
 
Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker 101 - Nov 2016
Docker 101 - Nov 2016
 
Docker and Go: why did we decide to write Docker in Go?
Docker and Go: why did we decide to write Docker in Go?Docker and Go: why did we decide to write Docker in Go?
Docker and Go: why did we decide to write Docker in Go?
 
Online Meetup: What's new in docker 1.13.0
Online Meetup: What's new in docker 1.13.0 Online Meetup: What's new in docker 1.13.0
Online Meetup: What's new in docker 1.13.0
 
Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)
 
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화
 
Lxd the proper way of runing containers
Lxd   the proper way of runing containersLxd   the proper way of runing containers
Lxd the proper way of runing containers
 
Container as a Service with Docker
Container as a Service with DockerContainer as a Service with Docker
Container as a Service with Docker
 
Infinit: Modern Storage Platform for Container Environments
Infinit: Modern Storage Platform for Container EnvironmentsInfinit: Modern Storage Platform for Container Environments
Infinit: Modern Storage Platform for Container Environments
 
Containerd - core container runtime component
Containerd - core container runtime component Containerd - core container runtime component
Containerd - core container runtime component
 
containerd and CRI
containerd and CRIcontainerd and CRI
containerd and CRI
 
OpenStack Tutorial
OpenStack TutorialOpenStack Tutorial
OpenStack Tutorial
 
Docker Online Meetup: Announcing Docker CE + EE
Docker Online Meetup: Announcing Docker CE + EEDocker Online Meetup: Announcing Docker CE + EE
Docker Online Meetup: Announcing Docker CE + EE
 
Openvz booth
Openvz boothOpenvz booth
Openvz booth
 
Docker - Build, Ship and Run Any App, Anywhere Hollywood edition
Docker - Build, Ship and Run Any App, Anywhere Hollywood editionDocker - Build, Ship and Run Any App, Anywhere Hollywood edition
Docker - Build, Ship and Run Any App, Anywhere Hollywood edition
 
Dchug m7-30 apr2013
Dchug m7-30 apr2013Dchug m7-30 apr2013
Dchug m7-30 apr2013
 

Similar to Docker - The Linux Container

Similar to Docker - The Linux Container (20)

Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
The Docker Ecosystem
The Docker EcosystemThe Docker Ecosystem
The Docker Ecosystem
 
Docker intro
Docker introDocker intro
Docker intro
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET Developers
 
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and JenkinsExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
 
Docker navjot kaur
Docker navjot kaurDocker navjot kaur
Docker navjot kaur
 
Docker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini AnandDocker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini Anand
 
Introducing Docker
Introducing DockerIntroducing Docker
Introducing Docker
 
Let's dockerize
Let's dockerizeLet's dockerize
Let's dockerize
 
Docker
DockerDocker
Docker
 
Docker
DockerDocker
Docker
 
Containerization using docker and its applications
Containerization using docker and its applicationsContainerization using docker and its applications
Containerization using docker and its applications
 
Containerization using docker and its applications
Containerization using docker and its applicationsContainerization using docker and its applications
Containerization using docker and its applications
 
Docker + Jelastic - planeetta.fi
Docker + Jelastic - planeetta.fiDocker + Jelastic - planeetta.fi
Docker + Jelastic - planeetta.fi
 
Agile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: IntroductionAgile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: Introduction
 
Docker Oxford launch - Introduction to Docker
Docker Oxford launch - Introduction to DockerDocker Oxford launch - Introduction to Docker
Docker Oxford launch - Introduction to Docker
 
Docker
DockerDocker
Docker
 
Docker slides
Docker slidesDocker slides
Docker slides
 
Docker
DockerDocker
Docker
 
Docker In Brief
Docker In BriefDocker In Brief
Docker In Brief
 

Recently uploaded

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
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
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 

Recently uploaded (20)

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
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
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 

Docker - The Linux Container

  • 1. Docker: The Linux container Name: BalajiRajan Date: 29-Sep-2013 Event:http://www.meetup.com/devops-bangalore
  • 2. What is docker? Docker is a tool created by the folks at dotCloud to make using LinuX Containers (LXC) easier to use. Linux Containers are basically light weight Virtual Machines (VM). A linux container runs Unix processes with strong guarantees of isolation across servers. Your software runs repeatably everywhere because its Container includes all of its dependencies.
  • 3. LXC  Lxc is an operating system-level virtualization method for running multiple isolated Linux systems (containers) on a single control host.  Basicaly, LXC provides a way to run mini operating systems in your host operating system.
  • 4. What about VM? ● Any virtualization technologies such as KVM, Hypervisor and Xen..etc, which started by booting separate virtual systems on emulated hardware, and then new vm runs as a full fledged OS and uses isolated process spaces. ● But Docker runs with Host Operating system as its share the host process spaces.
  • 6. Docker Vs VMs  Size: VMs are very large which makes them impractical to store and transfer. VM: You have a container image that is 1GB in size. If you wanted to use a Full VM, you would need to have 1GB times x number of VMs you want. Docker: With LXC you can share the bulk of the 1GB. It means that If you have 1000 containers you still might only have a little over 1GB of space for the containers OS, assuming they are all running the same OS image.
  • 7. Docker Vs VMs  Resource Utilization: (CPU & RAM) VM: A full virtualized system gets it's own set of resources allocated to it, and does minimal sharing. You get more isolation, but it is much heavier and requires more resources. Docker: With LXC you get less isolation, but they are more lightweight and require less resources.
  • 8. Docker Vs VMs  Performance: VM: A full virtualized system usually takes minutes to start. Docker: LXC containers take seconds, and most times less then a second.
  • 9. Docker's Advantage  Throwable Sandboxes: Create a container in a minute to test your stuffs and tear it down.  Fine Application Delivery: Containers allow you to package just about any application. You could add the dependencies of the application in the container itself. Ex: mysql service.  Reusability: Docker makes containers reusbale.  Uniformity: Development and production Environments.
  • 10. Installing Docker * Docker is still under heavy development! Don’t recommend using it in production yet. * Right now, the officially supported distributions are: * Ubuntu Precise 12.04 (LTS) (64-bit) * Ubuntu Raring 13.04 (64 bit)
  • 11. Installing Docker Requirement: * Kernel version: greater then 3.8 and Cgroups and namespaces must be enabled. * AUFS: AUFS is included in the kernels built by the Debian and Ubuntu distributions. * LXC: Installation method * Source * compiled binary * package manager
  • 12. Installing Docker # Add the Docker repository to your apt sources list. sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" # Update your sources sudo apt-get update # Install, lxc-docker sudo apt-get install lxc-docker # download the base 'ubuntu' container and run bash inside it #while setting up an interactive shell sudo docker run -i -t ubuntu /bin/bash
  • 13. Installing Docker # docker version Client version: 0.4.8 Server version: 0.4.8 # docker info Containers: 0 Images: 0 WARNING: No memory limit support WARNING: No swap limit support
  • 14. Terminalogy * Image An image is a read only layer used to build a container. They do not change. * Container Is basically a self contained runtime environment that is built using one or more images. You can commit your changes to a container and create an image. * Docker index / registry These are public or private servers where people can upload their repositories so they can easily share what they made.
  • 15. Creating container balaji@devops$ docker run -i -t ubuntu:12.04 /bin/bash $ cat /etc/issue Ubuntu 12.04 n $
  • 16. Lets see what docker is doing here. 1. Downloaded the image from docker repo. 2. Generated a new LXC container. 3. Created a new file system. 4. Mounted a read/write layer. 5. Allocated network interface. 6. Setup IP. 7. Setup NATing. 8 Executed the bash shell in the container. *****All in under a very few minutes *********
  • 17. Work with CLI: * List Images: $ docker images REPOSITORY TAG ID CREATED SIZE base latest b750fe79269d 3 months ago 24.65 kB (virtual 180.1 MB) base ubuntu-12.10 b750fe79269d 3 months ago 24.65 kB (virtual 180.1 MB) base ubuntu-quantal b750fe79269d 3 months ago 24.65 kB (virtual 180.1 MB) base ubuntu-quantl b750fe79269d 3 months ago 24.65 kB (virtual 180.1 MB) *List Containers: $ docker ps -a ID IMAGE COMMAND CREATED STATUS PORTS 861361e27501 base:latest /bin/echo hello world 1 minutes ago Exit 0
  • 18. Docker Index/registry The Docker Registry is server that stores all of the images and repositories. The Index just has the metadata about the images, repositories and the user accounts, but all of the images and repositories are stored in the Docker Registry. $ docker login Username (): myusername Password: Email (): myusername@example.com Login Succeeded
  • 19. Work with CLI: Important commands: * docker run base /bin/echo hello world * docker commit <id> * docker attach <id> * docker pull / push <id> * docker inspect <id> * docker diff <id> * docker stop/start <id> * docker rmi `docker images -a -q` - remove images * docker rm `docker ps -a -q` - remove container
  • 20. More Projects are coming on the way... ● http://blog.docker.io/2013/07/docker-projects-from-the-docker-co Important Projects: * Building Docker on Openstack with Vagrant * DockerUI – Web interface * Openstack-Docker * chef-docker - Installs/Configures Docker * Puppet module for installing Docker * dockermix – A command line tool to build and manage multi-container docker environments ●