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

PDF
Introduction To Docker
PDF
Shipping Applications to Production in Containers with Docker
PDF
Docker by Example - Basics
PPTX
Architecting .NET Applications for Docker and Container Based Deployments
PDF
Introduction to docker
PDF
Docker for developers
PPTX
Docker Introductory workshop
PPTX
Introduction To Docker
Introduction To Docker
Shipping Applications to Production in Containers with Docker
Docker by Example - Basics
Architecting .NET Applications for Docker and Container Based Deployments
Introduction to docker
Docker for developers
Docker Introductory workshop
Introduction To Docker

What's hot (20)

PDF
Docker - introduction
PDF
Docker and Containers for Development and Deployment — SCALE12X
PDF
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
PPTX
Docker Basics
PDF
Docker, the Future of DevOps
PDF
Docker from A to Z, including Swarm and OCCS
PDF
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
PDF
Basic docker for developer
PDF
OpenStack - Docker - Rackspace HQ
PDF
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
PPT
Docker introduction
PDF
Docker Introduction
PDF
Docker worshop @Twitter - How to use your own private registry
PDF
Docker From Scratch
PPTX
Intro Docker october 2013
PDF
Docker at Djangocon 2013 | Talk by Ken Cochrane
PDF
Introduction to docker
PDF
Introduction to Containers - SQL Server and Docker
PPTX
Docker Introduction
PDF
Docker Introduction + what is new in 0.9
Docker - introduction
Docker and Containers for Development and Deployment — SCALE12X
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Basics
Docker, the Future of DevOps
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
Basic docker for developer
OpenStack - Docker - Rackspace HQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
Docker introduction
Docker Introduction
Docker worshop @Twitter - How to use your own private registry
Docker From Scratch
Intro Docker october 2013
Docker at Djangocon 2013 | Talk by Ken Cochrane
Introduction to docker
Introduction to Containers - SQL Server and Docker
Docker Introduction
Docker Introduction + what is new in 0.9
Ad

Viewers also liked (20)

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

Similar to Docker - The Linux Container (20)

PPTX
Getting Started With Docker: Simplifying DevOps
PPTX
Docker Ecosystem on Azure
PDF
The Docker Ecosystem
PDF
Docker intro
PPTX
Docker for .NET Developers
PDF
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
PDF
Docker navjot kaur
PPSX
Docker and containers - Presentation Slides by Priyadarshini Anand
PDF
Introducing Docker
PDF
Let's dockerize
PDF
PPTX
PPTX
Containerization using docker and its applications
PPTX
Containerization using docker and its applications
PPTX
Docker + Jelastic - planeetta.fi
PDF
Agile Brown Bag - Vagrant & Docker: Introduction
PDF
Docker Oxford launch - Introduction to Docker
PPTX
PDF
Docker slides
PDF
Getting Started With Docker: Simplifying DevOps
Docker Ecosystem on Azure
The Docker Ecosystem
Docker intro
Docker for .NET Developers
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
Docker navjot kaur
Docker and containers - Presentation Slides by Priyadarshini Anand
Introducing Docker
Let's dockerize
Containerization using docker and its applications
Containerization using docker and its applications
Docker + Jelastic - planeetta.fi
Agile Brown Bag - Vagrant & Docker: Introduction
Docker Oxford launch - Introduction to Docker
Docker slides

Recently uploaded (20)

PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
UiPath Agentic Automation session 1: RPA to Agents
PDF
A review of recent deep learning applications in wood surface defect identifi...
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Abstractive summarization using multilingual text-to-text transfer transforme...
PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PPTX
Modernising the Digital Integration Hub
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Taming the Chaos: How to Turn Unstructured Data into Decisions
UiPath Agentic Automation session 1: RPA to Agents
A review of recent deep learning applications in wood surface defect identifi...
Custom Battery Pack Design Considerations for Performance and Safety
OpenACC and Open Hackathons Monthly Highlights July 2025
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
Hindi spoken digit analysis for native and non-native speakers
A comparative study of natural language inference in Swahili using monolingua...
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Getting started with AI Agents and Multi-Agent Systems
NewMind AI Weekly Chronicles – August ’25 Week III
Abstractive summarization using multilingual text-to-text transfer transforme...
Microsoft Excel 365/2024 Beginner's training
Consumable AI The What, Why & How for Small Teams.pdf
Modernising the Digital Integration Hub
Enhancing emotion recognition model for a student engagement use case through...
Module 1.ppt Iot fundamentals and Architecture
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Convolutional neural network based encoder-decoder for efficient real-time ob...

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 (): [email protected] 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 ●
  • 21. References: 1. docker.io 2. https://github.com/dotcloud/docker 3. http://kencochrane.net/blog/