SlideShare a Scribd company logo
1 of 24
Jian Wu
Reading Group
AI & Machine Learning Lab
Samsung SDSA
Introduction to Docker
Virtual Machine v.s. Docker Container
Docker Vocabulary
Docker Architecture
Inside Docker
Docker Daemon
Libcontainer
cgroups namespaces
AUFS
BTRFS
dm-thinp
VFS
KernelUserSpace
Linux Container
resource(cpu, mem)
limitation/isolation
Environment( process/network)
isolation
Copy on Write
File System
Inside Docker: AUFS File System
Layer 2
Layer 1
Base Image
Writable Layer
Container
Layer 1
Base Image
Writable Layer
Container
Snapshot
Container A Container B
Writable Layer
A
Writable Layer
B
Layer 2 (e.g. Configuration)
Layer 1 (e.g. MySQL)
Base Image (e.g. Ubuntu)
S
h
a
r
e
d
P
r
i
v
Killer Apps with Docker
Microservice Architecture
Microservice is a loosely coupled service oriented architecture with bounded contexts
Killer Apps with Docker
Continuous Deployment
Docker Community
(Dockercon SF 2015)
Setup Local Docker Environment
Install Docker on Ubuntu Linux:
adminuser@adminuser-VirtualBox:~$ sudo apt-get install -y docker.io
. . . . . .
Setting up docker.io (1.5.0~dfsg1-1ubuntu2) ...
Adding group `docker' (GID 132) ...
Done.
adminuser@adminuser-VirtualBox:~$ sudo service docker restart
adminuser@adminuser-VirtualBox:~$
Check Local Docker Environment:
adminuser@adminuser-VirtualBox:~$ sudo docker info
Containers: 0
Images: 0
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 0
Execution Driver: native-0.2
Kernel Version: 3.19.0-20-generic
Operating System: Ubuntu 15.04
CPUs: 1
Total Memory: 4.844 GiB
Name: adminuser-VirtualBox
ID: 7U44:LJUS:N4MT:LTUN:MRMW:JRG6:QURR:VEVF:BBJI:ISZQ:CISK:EGME
WARNING: No swap limit support
Setup Local Docker Environment
Pulling Docker Images from Docker Hub:
adminuser@adminuser-VirtualBox:~$ sudo docker pull ubuntu:15.04
Pulling repository ubuntu
82554298ff4f: Download complete
b8b73eaafc6e: Download complete
9f5beeea5d8a: Download complete
08ab09376d9a: Download complete
Status: Downloaded newer image for ubuntu:15.04
adminuser@adminuser-VirtualBox:~/dockerprjs$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
ubuntu 15.04 82554298ff4f 3 days ago 131.4 MB
ubuntu vivid 82554298ff4f 3 days ago 131.4 MB
ubuntu vivid-20150930 82554298ff4f 3 days ago 131.4 MB
Start Docker Container using “run” command:
adminuser@adminuser-VirtualBox:~$ sudo docker run -i -t ubuntu:15.04 /bin/bash
root@6bff442a89ad:/# ls
bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
root@6bff442a89ad:/# exit
exit
Building Docker Image with Dockerfile
Dockerfile is DSL to build Docker Image
A sample Dockerfile building a Play Web Server with AngularJS Front-end:
FROM ubuntu:15.04
MAINTAINER Jian Wu
ENV REFRESHED_AT 2015-10-12
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y wget
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-7-jdk
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libjansi-java
RUN java -version
RUN wget www.scala-lang.org/files/archive/scala-2.10.5.deb
RUN dpkg -i scala-2.10.5.deb
RUN wget --referer='http://www.scala-sbt.org/0.13/tutorial/Installing-sbt-on-Linux.html' --local-encoding=UTF-8 
https://dl.bintray.com/sbt/debian/sbt-0.13.8.deb
RUN dpkg -i sbt-0.13.8.deb
EXPOSE 9000
ADD spark-dataframe-report-server /dfreportserver
WORKDIR /dfreportserver
RUN sbt clean compile
CMD sbt run
Building Docker Image using “build” command:
adminuser@adminuser-VirtualBox:~/dockerprjs$ sudo docker build -t dfreportserverv1 .
. . . . . .
[success] Total time: 194 s, completed Oct 12, 2015 10:34:34 PM
---> f90b60f7cff6
Removing intermediate container 76a43d7db31a
Step 16 : CMD sbt run
---> Running in cfcc978b5781
---> 9101373c8e80
Removing intermediate container cfcc978b5781
Successfully built 9101373c8e80
adminuser@adminuser-VirtualBox:~/dockerprjs$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
dfreportserverv1 latest 9101373c8e80 56 seconds ago 836.9 MB
ubuntu vivid-20150930 82554298ff4f 4 days ago 131.4 MB
ubuntu 15.04 82554298ff4f 4 days ago 131.4 MB
ubuntu vivid 82554298ff4f 4 days ago 131.4 MB
Building Docker Image with Dockerfile
Running Docker Container with Locally Built Image
Start Docker Container using “run” command:
adminuser@adminuser-VirtualBox:~$ sudo docker run -it -p 9000:9000
dfreportserverv1
[info] Loading project definition from /dfreportserver/project
[info] Set current project to spark-dataframe-report-server (in build
file:/dfreportserver/)
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in
[jar:file:/root/.ivy2/cache/ch.qos.logback/logback-classic/jars/logback-c
lassic-1.1.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/root/.ivy2/cache/org.slf4j/slf4j-log4j12/jars/slf4j-log4j12-1.
7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
explanation.
SLF4J: Actual binding is of type
[ch.qos.logback.classic.util.ContextSelectorStaticBinder]
--- (Running the application, auto-reloading is enabled) ---
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Ctrl+D to stop and go back to the console...)
Docker Volume
Docker Volume let sys admin mount a directory from the Docker daemon’s host
into a container as a data volume
Docker Networking
Bridge Mode (Default):
“docker0” virtual interface is created as
“Ethernet Bridge” to routing network traffic
between containers and Docker Host
Host Mode:
Container directly using Host Network
Docker Registry
Docker Hub
(Dockercon SF 2015)
Major features:
-- Public and Private Docker repositories
-- Official Repositories
-- Collaborators, Organizations and Groups
-- Automated builds
-- Webhooks
Docker Hub (hub.docker.com) is a cloud registry service for sharing application
and automating workflows.
Docker Hub Architecture (v2)
(Dockercon SF 2015)
Docker Compose
(Dockercon SF 2015)
Simple Docker Cluster: Docker Swarm
Advanced Docker Cluster: Kubernetes
Advanced Docker Cluster: Mesos
AWS EC2 Container Service with Docker
AWS EC2 Container Registry

More Related Content

What's hot

Docker intro
Docker introDocker intro
Docker introOleg Z
 
Docker introduction
Docker introductionDocker introduction
Docker introductionPhuc Nguyen
 
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Simplilearn
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetesDongwon Kim
 
Docker introduction for the beginners
Docker introduction for the beginnersDocker introduction for the beginners
Docker introduction for the beginnersJuneyoung Oh
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with DockerRavindu Fernando
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)Gourav Varma
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionRobert Reiz
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT CampusAjeet Singh Raina
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionSparkbit
 
Learning Docker from Square One
Learning Docker from Square OneLearning Docker from Square One
Learning Docker from Square OneDocker, Inc.
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionPeng Xiao
 
A Hands-On Introduction To Docker Containers.pdf
A Hands-On Introduction To Docker Containers.pdfA Hands-On Introduction To Docker Containers.pdf
A Hands-On Introduction To Docker Containers.pdfEdith Puclla
 
Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker ComposeAjeet Singh Raina
 

What's hot (20)

Docker intro
Docker introDocker intro
Docker intro
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
 
Docker, LinuX Container
Docker, LinuX ContainerDocker, LinuX Container
Docker, LinuX Container
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
Docker
DockerDocker
Docker
 
Docker.pptx
Docker.pptxDocker.pptx
Docker.pptx
 
Docker introduction for the beginners
Docker introduction for the beginnersDocker introduction for the beginners
Docker introduction for the beginners
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with Docker
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Learning Docker from Square One
Learning Docker from Square OneLearning Docker from Square One
Learning Docker from Square One
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
A Hands-On Introduction To Docker Containers.pdf
A Hands-On Introduction To Docker Containers.pdfA Hands-On Introduction To Docker Containers.pdf
A Hands-On Introduction To Docker Containers.pdf
 
Jenkins Overview
Jenkins OverviewJenkins Overview
Jenkins Overview
 
Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker Compose
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 

Similar to Introduction to Docker

Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortalsHenryk Konsek
 
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Ben Hall
 
Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 augVincent De Smet
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystempsconnolly
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 applicationRoman Rodomansky
 
時代在變 Docker 要會:台北 Docker 一日入門篇
時代在變 Docker 要會:台北 Docker 一日入門篇時代在變 Docker 要會:台北 Docker 一日入門篇
時代在變 Docker 要會:台北 Docker 一日入門篇Philip Zheng
 
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth RushgroveThe Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth RushgroveDocker, Inc.
 
Docker workshop 0507 Taichung
Docker workshop 0507 Taichung Docker workshop 0507 Taichung
Docker workshop 0507 Taichung Paul Chao
 
手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇Philip Zheng
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014Carlo Bonamico
 
手把手帶你學Docker 03042017
手把手帶你學Docker 03042017手把手帶你學Docker 03042017
手把手帶你學Docker 03042017Paul Chao
 
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...Codemotion
 
Linux containers & Devops
Linux containers & DevopsLinux containers & Devops
Linux containers & DevopsMaciej Lasyk
 
Streamline your development environment with docker
Streamline your development environment with dockerStreamline your development environment with docker
Streamline your development environment with dockerGiacomo Bagnoli
 
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 AnandPRIYADARSHINI ANAND
 

Similar to Introduction to Docker (20)

Introducing Docker
Introducing DockerIntroducing Docker
Introducing Docker
 
Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortals
 
Docker intro
Docker introDocker intro
Docker intro
 
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)
 
Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 aug
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystem
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
 
時代在變 Docker 要會:台北 Docker 一日入門篇
時代在變 Docker 要會:台北 Docker 一日入門篇時代在變 Docker 要會:台北 Docker 一日入門篇
時代在變 Docker 要會:台北 Docker 一日入門篇
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth RushgroveThe Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
 
Docker workshop 0507 Taichung
Docker workshop 0507 Taichung Docker workshop 0507 Taichung
Docker workshop 0507 Taichung
 
手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014
 
手把手帶你學Docker 03042017
手把手帶你學Docker 03042017手把手帶你學Docker 03042017
手把手帶你學Docker 03042017
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
 
Linux containers & Devops
Linux containers & DevopsLinux containers & Devops
Linux containers & Devops
 
Streamline your development environment with docker
Streamline your development environment with dockerStreamline your development environment with docker
Streamline your development environment with docker
 
Docker Intro
Docker IntroDocker Intro
Docker Intro
 
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
 

Recently uploaded

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
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
 
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
 
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
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
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
 

Recently uploaded (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
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
 
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
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
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
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 

Introduction to Docker

  • 1. Jian Wu Reading Group AI & Machine Learning Lab Samsung SDSA Introduction to Docker
  • 2. Virtual Machine v.s. Docker Container
  • 5. Inside Docker Docker Daemon Libcontainer cgroups namespaces AUFS BTRFS dm-thinp VFS KernelUserSpace Linux Container resource(cpu, mem) limitation/isolation Environment( process/network) isolation Copy on Write File System
  • 6. Inside Docker: AUFS File System Layer 2 Layer 1 Base Image Writable Layer Container Layer 1 Base Image Writable Layer Container Snapshot Container A Container B Writable Layer A Writable Layer B Layer 2 (e.g. Configuration) Layer 1 (e.g. MySQL) Base Image (e.g. Ubuntu) S h a r e d P r i v
  • 7. Killer Apps with Docker Microservice Architecture Microservice is a loosely coupled service oriented architecture with bounded contexts
  • 8. Killer Apps with Docker Continuous Deployment
  • 10. Setup Local Docker Environment Install Docker on Ubuntu Linux: adminuser@adminuser-VirtualBox:~$ sudo apt-get install -y docker.io . . . . . . Setting up docker.io (1.5.0~dfsg1-1ubuntu2) ... Adding group `docker' (GID 132) ... Done. adminuser@adminuser-VirtualBox:~$ sudo service docker restart adminuser@adminuser-VirtualBox:~$ Check Local Docker Environment: adminuser@adminuser-VirtualBox:~$ sudo docker info Containers: 0 Images: 0 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 0 Execution Driver: native-0.2 Kernel Version: 3.19.0-20-generic Operating System: Ubuntu 15.04 CPUs: 1 Total Memory: 4.844 GiB Name: adminuser-VirtualBox ID: 7U44:LJUS:N4MT:LTUN:MRMW:JRG6:QURR:VEVF:BBJI:ISZQ:CISK:EGME WARNING: No swap limit support
  • 11. Setup Local Docker Environment Pulling Docker Images from Docker Hub: adminuser@adminuser-VirtualBox:~$ sudo docker pull ubuntu:15.04 Pulling repository ubuntu 82554298ff4f: Download complete b8b73eaafc6e: Download complete 9f5beeea5d8a: Download complete 08ab09376d9a: Download complete Status: Downloaded newer image for ubuntu:15.04 adminuser@adminuser-VirtualBox:~/dockerprjs$ sudo docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE ubuntu 15.04 82554298ff4f 3 days ago 131.4 MB ubuntu vivid 82554298ff4f 3 days ago 131.4 MB ubuntu vivid-20150930 82554298ff4f 3 days ago 131.4 MB Start Docker Container using “run” command: adminuser@adminuser-VirtualBox:~$ sudo docker run -i -t ubuntu:15.04 /bin/bash root@6bff442a89ad:/# ls bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var root@6bff442a89ad:/# exit exit
  • 12. Building Docker Image with Dockerfile Dockerfile is DSL to build Docker Image A sample Dockerfile building a Play Web Server with AngularJS Front-end: FROM ubuntu:15.04 MAINTAINER Jian Wu ENV REFRESHED_AT 2015-10-12 RUN DEBIAN_FRONTEND=noninteractive apt-get update -y RUN DEBIAN_FRONTEND=noninteractive apt-get install -y wget RUN DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-7-jdk RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libjansi-java RUN java -version RUN wget www.scala-lang.org/files/archive/scala-2.10.5.deb RUN dpkg -i scala-2.10.5.deb RUN wget --referer='http://www.scala-sbt.org/0.13/tutorial/Installing-sbt-on-Linux.html' --local-encoding=UTF-8 https://dl.bintray.com/sbt/debian/sbt-0.13.8.deb RUN dpkg -i sbt-0.13.8.deb EXPOSE 9000 ADD spark-dataframe-report-server /dfreportserver WORKDIR /dfreportserver RUN sbt clean compile CMD sbt run
  • 13. Building Docker Image using “build” command: adminuser@adminuser-VirtualBox:~/dockerprjs$ sudo docker build -t dfreportserverv1 . . . . . . . [success] Total time: 194 s, completed Oct 12, 2015 10:34:34 PM ---> f90b60f7cff6 Removing intermediate container 76a43d7db31a Step 16 : CMD sbt run ---> Running in cfcc978b5781 ---> 9101373c8e80 Removing intermediate container cfcc978b5781 Successfully built 9101373c8e80 adminuser@adminuser-VirtualBox:~/dockerprjs$ sudo docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE dfreportserverv1 latest 9101373c8e80 56 seconds ago 836.9 MB ubuntu vivid-20150930 82554298ff4f 4 days ago 131.4 MB ubuntu 15.04 82554298ff4f 4 days ago 131.4 MB ubuntu vivid 82554298ff4f 4 days ago 131.4 MB Building Docker Image with Dockerfile
  • 14. Running Docker Container with Locally Built Image Start Docker Container using “run” command: adminuser@adminuser-VirtualBox:~$ sudo docker run -it -p 9000:9000 dfreportserverv1 [info] Loading project definition from /dfreportserver/project [info] Set current project to spark-dataframe-report-server (in build file:/dfreportserver/) SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/root/.ivy2/cache/ch.qos.logback/logback-classic/jars/logback-c lassic-1.1.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/root/.ivy2/cache/org.slf4j/slf4j-log4j12/jars/slf4j-log4j12-1. 7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder] --- (Running the application, auto-reloading is enabled) --- [info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000 (Server started, use Ctrl+D to stop and go back to the console...)
  • 15. Docker Volume Docker Volume let sys admin mount a directory from the Docker daemon’s host into a container as a data volume
  • 16. Docker Networking Bridge Mode (Default): “docker0” virtual interface is created as “Ethernet Bridge” to routing network traffic between containers and Docker Host Host Mode: Container directly using Host Network
  • 18. Docker Hub (Dockercon SF 2015) Major features: -- Public and Private Docker repositories -- Official Repositories -- Collaborators, Organizations and Groups -- Automated builds -- Webhooks Docker Hub (hub.docker.com) is a cloud registry service for sharing application and automating workflows.
  • 19. Docker Hub Architecture (v2) (Dockercon SF 2015)
  • 21. Simple Docker Cluster: Docker Swarm
  • 24. AWS EC2 Container Service with Docker AWS EC2 Container Registry