SlideShare a Scribd company logo
Introduction to Docker
@endhrk
Agenda
● What Is Docker
●
How To Use Docker
– How Do I Install Docker
– How Do I Use Docker
– How Do I Build containers
– How Do I Terminate
● Important Docker terms
● Consisting Of Docker Engine
– Lightweight
– Portable
– Packaging
What Is Docker
● Open platform
● For developers and system administrators
● To build, ship ,run applications
How To Use Docker
● Install
● Use
● Build
● Delete
How Do I Install Docker
*may not be the latest Docker release
**Install for Ubuntu 14.04
$ sudo apt-get -y install docker.io
$ sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker
$ sudo gpasswd -a $USER docker
How Do I Use Docker
$ sudo start docker.io
$ docker run -i -t ubuntu /bin/bash
root@0f0bd22ce93e:/#
How Do I Build Containers
● Dockerfile
FROM ubuntu:14.04
RUN apt-get -y install apache2
EXPOSE 80
CMD [“/usr/sbin/apache2ctl”, “-D”, “FOREGROUND”]
$ docker build -t apache .
$ docker run -d -P apache
f254fc1aa31909783a26fb14f80d75ba128762b605604f95ef9a146de0ee46ed
How Do I Terminate
● Stop container
● Remove container
● Remove all images
●
$ docker stop f254fc1aa319
$ docker rmi `docker images -q`
$ docker rm f254fc1aa319
Important Docker Terms
● Docker image
– Is Read-only template
● ex. contains an Ubuntu with Apache and applications
– Is used to create Docker container
– Provides simple way for delivery
● Docker registry
– Holds images
– Provides simple way to upload and download images
– Has public and private
● Public is called Docker Hub
● Private Docker registry is provided by docker image at Docker Hub.
● Docker container
– Is an isolated and secure application platform
– Is created from a Docker image
– Can be run, started, stopped, moved, deleted
Consisting Of Docker Engine
● Lightweight
● Portable
● Packaging
Consisting Of Docker Engine
● Lightweight
● Portable
● Packaging
Why Is Docker Lightweight
● Container virtualization
● Union file system
Why Is Docker Lightweight
● Container virtualization
● Union file system
What Is Container Virtualization
● Virtualization technology
– Hardware virtualization (ex. VMware, Hyper-v)
– Container virtualization (ex. Docker, OpenVZ)
What Are Difference Between
Technologies
Hardware virtualization Container virtualization
What is virtualized
Virtualized hardware environment Virtualized OS environment
What can be put on Host
Different OS Different Lib/Bin (kernel is shared)
What is launched
Launch OS Launch process
How to access I/O
Via Virtualized hardware Use directly limited resources
What Are Stacks Difference
Between Technologies
Hardware
Hypervisor
Bin/Libs
MW MW MW
App App App
Kernel
Bin/Libs
Kernel
Bin/Libs
Kernel
Virtual
Hardware
Virtual
Hardware
Virtual
Hardware
Hardware
Linux kernel
Bin/Libs
Docker
daemon MW MW
App App
Bin/Libs Bin/Libs
Hardware virtualization Container virtualization
How Much Are Their Performance
Difference
CPU Memory fileio
0 sec
5 sec
10 sec
15 sec
20 sec
25 sec
30 sec
35 sec
physical
docker
virtualbox
* This benchmark was measured using sysbench
Components For
Container Virtualization
● Isolation
– Identify a set of processes
– Isolate resources
– Don't recognize each other processes
● Resource control
– Limit the resources used
* resource = process id, memory, cpu, disk space, network
How To Realize
Container Virtualization
● Using kernel feature
● Isolation via namespace
– PID namespace
– Network namespace
– UTS namespace (hostname etc.)
– IPC namespace
– Mount namespace
● Resource control via cgroups
– Resource limiting
– Prioritization process
– Accounting using resources
– Control groups
What Is Meant By Lightweight For
Container
● Container virtualization
– Launch faster
● launch only process. Kernel was already booted.
– Use resources efficiently
● Kernel and memory are shared
– Run process faster
● There is no overhead like hardware virtualization
Why Is Docker Lightweight
● Container virtualization
● Union file system
What Is Union File System
● Union file system is
– Several filesystems to be mounted, appearing to be
one filesystem
● Docker uses aufs
– You can choose other option (ex. devicemapper
How Does Aufs Work
1.Mount a base image as read-only
2.Add read-write file system over read-only file
system
3.Change some files and directories to top as read-
write file system
4.It is committed
5.Save incremental files and directories in new image
6.Mount the image as read-only and add read-write
file system on top
How Does Aufs Work
What Is Meant By Lightweight For
Union File System
Bin/Libs
MW
App
Image
Bin/Libs
MW
App
Container1
shared
MW
App
Container2
● Owing to use of union file system
– Not changed files are shared for each containers
– Storage and memory spaces are saved
– Faster deployment of containers
shared
MW
App
Container3
shared
shared
App
Container4
Consisting Of Docker Engine
● Lightweight
● Portable
● Packaging
Why Is Docker Portable
● Run anywhere
● Simple way to take image to another
environment
● Copy Incremental files only
Which Environment Can I Use
● Run anywhere
– Any OS?
● ex. Linux, ?Mac OSX?, ?Windows?
– Any Cloud
● ex. Google Cloud Platform, Amazon Web Services, SoftLayer
– Any Physical Machine
● ex. Your PC, Server for production
*You have to use Docker on Virtualbox if you use Mac OSX or Windows
How Can I Take the Image
● Simple way to take image to another environment
– Docker Hub (like GitHub)
● Can set tag (version control)
● Easy to push image
● Easy to pull image
● Allow to access from anyone
– Private registry
● Can limit access person who is not allowed
● Basic features are same as Docker Hub
What Does Docker Copy
Bin/Libs
MW
App
Bin/Libs
MW
App Diff
Image
Bin/Libs
MW
App
Container
Update
Container
Commit
Diff
Image
Run
Run
Bin/Libs
MW
App Diff
Container
● Save only changed files
● Push or pull just small increment files
What Is Meant By Portable
● Run anywhere
● Simple way to take image to another
environment
● Copy Incremental files only
Consisting Of Docker Engine
● Lightweight
● Portable
● Packaging
What Is Packaged In Docker Image
● Docker image contains
– Application
– Middleware required by Application
– Basic programs (like a OS)
– Settings
● Application, Middleware, OS(Disk, Network)
● All of things for running Application
What Is Meant By Packaging
● Image contains all of things for running
application
● Packaging realize
– Portable and reliable application deployments
– Rapid and efficient application delivery
– Simplified application runtime environment
– Coding explicit knowledge
Review
● How to use Docker
● Important docker terms
● Consisting of Docker Engine
– Lightweight
– Portable
– Packaging
Thanks

More Related Content

PDF
Docker internals
PDF
Introduzione a Docker (Maggio 2017) [ITA]
PDF
DockerでWordPressサイトを開発してみよう
PDF
OpenStack-Ansibleで作るOpenStack HA環境 手順書解説 - OpenStack最新情報セミナー 2016年3月
PDF
도커 없이 컨테이너 만들기 3편
PDF
Kubernetes Summit 2023: Head First Kubernetes
PDF
TripleOの光と闇
PDF
kubernetes - minikube - getting started
Docker internals
Introduzione a Docker (Maggio 2017) [ITA]
DockerでWordPressサイトを開発してみよう
OpenStack-Ansibleで作るOpenStack HA環境 手順書解説 - OpenStack最新情報セミナー 2016年3月
도커 없이 컨테이너 만들기 3편
Kubernetes Summit 2023: Head First Kubernetes
TripleOの光と闇
kubernetes - minikube - getting started

What's hot (20)

PDF
VirtualBox と Rocky Linux 8 で始める Pacemaker ~ VirtualBox でも STONITH 機能が試せる! Vi...
PDF
Osic tech talk presentation on ironic inspector
PDF
Docker란 무엇인가? : Docker 기본 사용법
PDF
Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】
PDF
MN-3, MN-Core and HPL - SC21 Green500 BOF
PDF
Ironic - A modern approach to machine deployment
PDF
20111015 勉強会 (PCIe / SR-IOV)
PDF
Building Internet Server using CentOS 7 and CentOS Web Panel (CWP)
PDF
High availability virtualization with proxmox
PDF
QUICとNATと
PDF
[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3
PDF
도커 없이 컨테이너 만들기 2편
PDF
초심자를 위한 도커 소개 및 입문
PDF
YOW2020 Linux Systems Performance
PPTX
Ansible for beginners
PDF
初心者がOpenIndianaで自宅サーバを作ったよって話
PPTX
Docker 사내교육 자료
PDF
CentOS 8で標準搭載! 「389-ds」で構築する 認証サーバーについて
PDF
Using eBPF for High-Performance Networking in Cilium
PDF
De desarrollo a producción usando docker
VirtualBox と Rocky Linux 8 で始める Pacemaker ~ VirtualBox でも STONITH 機能が試せる! Vi...
Osic tech talk presentation on ironic inspector
Docker란 무엇인가? : Docker 기본 사용법
Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】
MN-3, MN-Core and HPL - SC21 Green500 BOF
Ironic - A modern approach to machine deployment
20111015 勉強会 (PCIe / SR-IOV)
Building Internet Server using CentOS 7 and CentOS Web Panel (CWP)
High availability virtualization with proxmox
QUICとNATと
[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3
도커 없이 컨테이너 만들기 2편
초심자를 위한 도커 소개 및 입문
YOW2020 Linux Systems Performance
Ansible for beginners
初心者がOpenIndianaで自宅サーバを作ったよって話
Docker 사내교육 자료
CentOS 8で標準搭載! 「389-ds」で構築する 認証サーバーについて
Using eBPF for High-Performance Networking in Cilium
De desarrollo a producción usando docker
Ad

Similar to Introduction to docker (20)

PDF
Docker+java
ODP
Docker on Power Systems
PDF
Continuous Integration with Docker on AWS
PDF
Docker for developers
PDF
Docker introduction
PDF
Docker Fundamentals
PDF
Introduction to Docker, December 2014 "Tour de France" Edition
PDF
Workshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
PDF
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
PDF
Using Docker to build and test in your laptop and Jenkins
PDF
Docker 0.11 at MaxCDN meetup in Los Angeles
PPTX
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
PPTX
Detailed Introduction To Docker
PPTX
Java developer intro to environment management with vagrant puppet and docker
PDF
Docker Up and Running for Web Developers
PDF
Docker up and Running For Web Developers
PDF
[@NaukriEngineering] Docker 101
PPTX
Dockerizing a Symfony2 application
PDF
Docker navjot kaur
PPTX
Introduction to automated environment management with Docker Containers - for...
Docker+java
Docker on Power Systems
Continuous Integration with Docker on AWS
Docker for developers
Docker introduction
Docker Fundamentals
Introduction to Docker, December 2014 "Tour de France" Edition
Workshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Using Docker to build and test in your laptop and Jenkins
Docker 0.11 at MaxCDN meetup in Los Angeles
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
Detailed Introduction To Docker
Java developer intro to environment management with vagrant puppet and docker
Docker Up and Running for Web Developers
Docker up and Running For Web Developers
[@NaukriEngineering] Docker 101
Dockerizing a Symfony2 application
Docker navjot kaur
Introduction to automated environment management with Docker Containers - for...
Ad

Recently uploaded (20)

PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Approach and Philosophy of On baking technology
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
cuic standard and advanced reporting.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPT
Teaching material agriculture food technology
PDF
KodekX | Application Modernization Development
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Spectral efficient network and resource selection model in 5G networks
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Approach and Philosophy of On baking technology
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
20250228 LYD VKU AI Blended-Learning.pptx
The AUB Centre for AI in Media Proposal.docx
cuic standard and advanced reporting.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Teaching material agriculture food technology
KodekX | Application Modernization Development
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Unlocking AI with Model Context Protocol (MCP)
NewMind AI Monthly Chronicles - July 2025
Review of recent advances in non-invasive hemoglobin estimation
Advanced methodologies resolving dimensionality complications for autism neur...
Spectral efficient network and resource selection model in 5G networks

Introduction to docker

  • 2. Agenda ● What Is Docker ● How To Use Docker – How Do I Install Docker – How Do I Use Docker – How Do I Build containers – How Do I Terminate ● Important Docker terms ● Consisting Of Docker Engine – Lightweight – Portable – Packaging
  • 3. What Is Docker ● Open platform ● For developers and system administrators ● To build, ship ,run applications
  • 4. How To Use Docker ● Install ● Use ● Build ● Delete
  • 5. How Do I Install Docker *may not be the latest Docker release **Install for Ubuntu 14.04 $ sudo apt-get -y install docker.io $ sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker $ sudo gpasswd -a $USER docker
  • 6. How Do I Use Docker $ sudo start docker.io $ docker run -i -t ubuntu /bin/bash root@0f0bd22ce93e:/#
  • 7. How Do I Build Containers ● Dockerfile FROM ubuntu:14.04 RUN apt-get -y install apache2 EXPOSE 80 CMD [“/usr/sbin/apache2ctl”, “-D”, “FOREGROUND”] $ docker build -t apache . $ docker run -d -P apache f254fc1aa31909783a26fb14f80d75ba128762b605604f95ef9a146de0ee46ed
  • 8. How Do I Terminate ● Stop container ● Remove container ● Remove all images ● $ docker stop f254fc1aa319 $ docker rmi `docker images -q` $ docker rm f254fc1aa319
  • 9. Important Docker Terms ● Docker image – Is Read-only template ● ex. contains an Ubuntu with Apache and applications – Is used to create Docker container – Provides simple way for delivery ● Docker registry – Holds images – Provides simple way to upload and download images – Has public and private ● Public is called Docker Hub ● Private Docker registry is provided by docker image at Docker Hub. ● Docker container – Is an isolated and secure application platform – Is created from a Docker image – Can be run, started, stopped, moved, deleted
  • 10. Consisting Of Docker Engine ● Lightweight ● Portable ● Packaging
  • 11. Consisting Of Docker Engine ● Lightweight ● Portable ● Packaging
  • 12. Why Is Docker Lightweight ● Container virtualization ● Union file system
  • 13. Why Is Docker Lightweight ● Container virtualization ● Union file system
  • 14. What Is Container Virtualization ● Virtualization technology – Hardware virtualization (ex. VMware, Hyper-v) – Container virtualization (ex. Docker, OpenVZ)
  • 15. What Are Difference Between Technologies Hardware virtualization Container virtualization What is virtualized Virtualized hardware environment Virtualized OS environment What can be put on Host Different OS Different Lib/Bin (kernel is shared) What is launched Launch OS Launch process How to access I/O Via Virtualized hardware Use directly limited resources
  • 16. What Are Stacks Difference Between Technologies Hardware Hypervisor Bin/Libs MW MW MW App App App Kernel Bin/Libs Kernel Bin/Libs Kernel Virtual Hardware Virtual Hardware Virtual Hardware Hardware Linux kernel Bin/Libs Docker daemon MW MW App App Bin/Libs Bin/Libs Hardware virtualization Container virtualization
  • 17. How Much Are Their Performance Difference CPU Memory fileio 0 sec 5 sec 10 sec 15 sec 20 sec 25 sec 30 sec 35 sec physical docker virtualbox * This benchmark was measured using sysbench
  • 18. Components For Container Virtualization ● Isolation – Identify a set of processes – Isolate resources – Don't recognize each other processes ● Resource control – Limit the resources used * resource = process id, memory, cpu, disk space, network
  • 19. How To Realize Container Virtualization ● Using kernel feature ● Isolation via namespace – PID namespace – Network namespace – UTS namespace (hostname etc.) – IPC namespace – Mount namespace ● Resource control via cgroups – Resource limiting – Prioritization process – Accounting using resources – Control groups
  • 20. What Is Meant By Lightweight For Container ● Container virtualization – Launch faster ● launch only process. Kernel was already booted. – Use resources efficiently ● Kernel and memory are shared – Run process faster ● There is no overhead like hardware virtualization
  • 21. Why Is Docker Lightweight ● Container virtualization ● Union file system
  • 22. What Is Union File System ● Union file system is – Several filesystems to be mounted, appearing to be one filesystem ● Docker uses aufs – You can choose other option (ex. devicemapper
  • 23. How Does Aufs Work 1.Mount a base image as read-only 2.Add read-write file system over read-only file system 3.Change some files and directories to top as read- write file system 4.It is committed 5.Save incremental files and directories in new image 6.Mount the image as read-only and add read-write file system on top
  • 25. What Is Meant By Lightweight For Union File System Bin/Libs MW App Image Bin/Libs MW App Container1 shared MW App Container2 ● Owing to use of union file system – Not changed files are shared for each containers – Storage and memory spaces are saved – Faster deployment of containers shared MW App Container3 shared shared App Container4
  • 26. Consisting Of Docker Engine ● Lightweight ● Portable ● Packaging
  • 27. Why Is Docker Portable ● Run anywhere ● Simple way to take image to another environment ● Copy Incremental files only
  • 28. Which Environment Can I Use ● Run anywhere – Any OS? ● ex. Linux, ?Mac OSX?, ?Windows? – Any Cloud ● ex. Google Cloud Platform, Amazon Web Services, SoftLayer – Any Physical Machine ● ex. Your PC, Server for production *You have to use Docker on Virtualbox if you use Mac OSX or Windows
  • 29. How Can I Take the Image ● Simple way to take image to another environment – Docker Hub (like GitHub) ● Can set tag (version control) ● Easy to push image ● Easy to pull image ● Allow to access from anyone – Private registry ● Can limit access person who is not allowed ● Basic features are same as Docker Hub
  • 30. What Does Docker Copy Bin/Libs MW App Bin/Libs MW App Diff Image Bin/Libs MW App Container Update Container Commit Diff Image Run Run Bin/Libs MW App Diff Container ● Save only changed files ● Push or pull just small increment files
  • 31. What Is Meant By Portable ● Run anywhere ● Simple way to take image to another environment ● Copy Incremental files only
  • 32. Consisting Of Docker Engine ● Lightweight ● Portable ● Packaging
  • 33. What Is Packaged In Docker Image ● Docker image contains – Application – Middleware required by Application – Basic programs (like a OS) – Settings ● Application, Middleware, OS(Disk, Network) ● All of things for running Application
  • 34. What Is Meant By Packaging ● Image contains all of things for running application ● Packaging realize – Portable and reliable application deployments – Rapid and efficient application delivery – Simplified application runtime environment – Coding explicit knowledge
  • 35. Review ● How to use Docker ● Important docker terms ● Consisting of Docker Engine – Lightweight – Portable – Packaging