Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Docker Introduction at JCConf Taiwan 2014

My Docker speech at JCConf Taiwan 2014: http://jcconf.tw/docker-most-write-once-run-anywhere.html Video available: http://youtu.be/H7YybGgy_0Y
by

William Yeh

on 17 August 2015

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Docker Introduction at JCConf Taiwan 2014

lightweight
www.docker.com
dock·er

[countable]

British English
someone whose job is loading and unloading ships
[=
longshoreman

American English
]
http://www.ldoceonline.com/dictionary/docker
ship

[transitive]
to send goods somewhere by ship, plane, truck etc

http://www.ldoceonline.com/dictionary/ship_2
Archimedes
Credit: http://imgarcade.com/1/archimedes-inventions-for-kids/
Credit: http://commons.wikimedia.org/wiki/File:Stevedores_ny_1912.jpg
Public domain.

name
Source: http://nicomachus.net/2011/02/sisyphus-gets-a-desk-job/
dependency
isolation
ship
degree of
isolation
VM
PL-level virtual environment
alternatives
coverage of
dependency
component
PL-level package manager
OS-level package manager
VM image
coverage of
dependency
degree of
isolation
component
PL-level package manager
OS-level package manager
VM image
VM
PL-level virtual environment
alternatives
libjna-java
$JAVA_HOME
nvm / n / nodeenv
PHPbrew + virtPHP
rbenv / rvm
virtualenv / pyvenv
heavyweight!!!
Credit: http://www.juggaar.com/2014/03/turkish-car-overload.html
Credit: https://www.flickr.com/photos/hugo90/4383629872/
CC-BY-2.0
Credit: http://emesv26.blogspot.tw/2013/01/overloaded-car.html
Credit: https://www.flickr.com/photos/perpetualplum/4526748750/
CC-BY-2.0
ship

[intransitive and transitive]
technical

to to make a piece of computer equipment or software available for people to buy
http://www.ldoceonline.com/dictionary/ship_2
apt-get install
lxml
(Python)
gm
(Node.js)
fluentd
(Ruby)
Cassandra
(Java)
libxml2-dev libxslt1-dev
graphicsmagick libgraphicsmagick1-dev
libjemalloc-dev
show-kernel-info.sh
This script is to display:

KERNEL:
Kernel info

USERLAND:
Root file system info
OS fingerprint
CentOS 5.10
2.6.18-371
Kernel
Root FS
/
/bin
/etc
/home
/opt
/usr
/var
...
CentOS 5.10 with customized app installed
2.6.18-371
Kernel
Root FS
/
/bin
/etc
/home
/opt
/opt/show-kernel-info.sh
/usr
/var
...
show-kernel-info.sh
This script is to display:

KERNEL:
Kernel info

USERLAND:
Root file system info
OS fingerprint
Dockerfile
FROM
centos:centos5

COPY
show-kernel-info.sh /opt/

CMD
["/opt/show-kernel-info.sh"]
dockerize
install to /opt directory
base image
Docker image
dependency?
CentOS 5.10 with customized app installed
2.6.18-371
Kernel
Root
FS
/
/bin
/etc
/home
/opt
/opt/show-kernel-info.sh
/usr
/var
...
show-kernel-info.sh
This script is to display:

KERNEL:
Kernel info

USERLAND:
Root file system info
OS fingerprint
Docker image
isolation?
it depends...
Host OS
Kernel
Host OS
Root FS
/
/bin
/etc
/home
/opt
/usr
/var
/var/lib/docker/...
...
CentOS 5.10 with customized app installed
2.6.18-371
Kernel
Root FS
/
/bin
/etc
/home
/opt
/opt/show-kernel-info.sh
/usr
/var
...
show-kernel-info.sh
This script is to display:

KERNEL:
Kernel info

USERLAND:
Root file system info
OS fingerprint
Docker image
lightweight?
it depends...
Host OS
Kernel
Host OS
Root FS
/
/bin
/etc
/home
/opt
/usr
/var
/var/lib/docker/...
...
CentOS 5.10 with customized app installed
2.6.18-371
Kernel
Root FS
/
/bin
/etc
/home
/opt
/opt/show-kernel-info.sh
/usr
/var
...
show-kernel-info.sh
This script is to display:

KERNEL:
Kernel info

USERLAND:
Root file system info
OS fingerprint
Docker image
lightweight?
Host OS Kernel
Docker engine
Ubuntu
14.04

CoreOS
444.5.0

choices:

bare metal
VPS
IaaS
PaaS
dependency
isolation
lightweight
standard
- - - - - - - - - - - - - - - - - - - - - - - - - ->>
CentOS 5.10 with customized app installed
2.6.18-371
Kernel
Root FS
/
/bin
/etc
/home
/opt
/opt/show-kernel-info.sh
/usr
/var
...
show-kernel-info.sh
This script is to display:

KERNEL:
Kernel info

USERLAND:
Root file system info
OS fingerprint
Docker image
lightweight?
it depends...
Host OS
Kernel
Host OS
Root FS
/
/bin
/etc
/home
/opt
/usr
/var
/var/lib/docker/...
...
Two kernels?
Too heavy...
Linux boot sequence:
BIOS
Boot loader
Kernel
configure HW
initrd
image: uncompress & load
load kernel modules
unmount
initrd
image
mount root partition
Init
process
Runlevel scripts
Quote: http://www.brendangregg.com/blog/2014-05-07/what-color-is-your-xen.html
"Despite the Xen improvements,
Solaris Zones, or Linux containers, should still be the fastest possible virtualization option
, allowing guests to run bare-metal everything."
3.13.0
3.16.2
. . . . . . . . . . .
Linux
distributions:
Round #1: Docker vs VM
lightweight?
Round #2: Docker vs native
VM
Docker
"Makefile" for Docker images
namespace
pid
net
ipc
mnt
uts
user
execution driver
libcontainer
LXC
cgroup
cpu
memory
I/O
storage driver
AUFS
BTRFS
device mapper
Docker Engine (Daemon)
Linux Kernel ≥ 3.8
Host OS
Dockerized app
Dockerized app
In most cases, a
dockerized app
acts as a normal native process within the host OS.
For more performance details:

Performance characteristics of traditional vms vs docker containers
(benchmark by IBM):
Video: youtu.be/JHqM_5X3MBU
Slide: http://www.slideshare.net/BodenRussell/performance-characteristics-of-traditional-v-ms-vs-docker-containers-dockercon14
Paper: http://domino.research.ibm.com/library/cyberdig.nsf/papers/0929052195D

Docker Tips And Tricks
(at the Docker Beijing Meetup):
Slide: http://www.slideshare.net/jpetazzo/docker-tips-and-tricks-at-the-docker-beijing-meetup
At run time, "
cgroup
" and "
namespace
" mechanisms of Linux kernel are also used.
a simple app
ship
native
Docker
Continuous
Integration/Deployment
Flow
Build / Package
make
ant
maven
gradle
pip
Artifact Repository
zip / tar.gz
jar / war / ear
rpm
deb
installer
Deployment
ad-hoc script
Capistrano
Fabric
Ansible

yum
apt
Configuration
ad-hoc script
Chef
Puppet
Ansible
Salt
Code / Config
git
rake
gem
bundle
npm
assets pipeline
Jenkins
Travis
Bamboo
Nexus
Artifactory
build phase
deployment phase
most related to Docker "ship" feature
legend:
dependency
isolation
standard
standard
lightweight
... versus traditional
VM approach
www.docker.com
dockerized
app
EXPOSE
ports
data
VOLUME
stdout
stderr
Linux kernel
≥ 3.8
x86_64
Arch Linux
ARM
Raspberry Pi
Windows Server
≥ 2015 ?
x86_64
Docker engine
Linux container
Linux container
Windows container
Docker engine
Docker engine
Docker Hub
Quay.io
public registry
private registry
...
Build
Ship
Run
In most cases, a
dockerized app
acts as a normal native process within the host OS.
dockerized
app
EXPOSE
ports
data
VOLUME
stdout
stderr
Linux kernel
≥ 3.8
x86_64
Arch Linux
ARM
Raspberry PI
Windows Server
≥ 2015 ?
x86_64
Docker engine
Linux container
Linux container
Windows container
Docker engine
Docker engine
Docker Hub
Quay.io
private registry
Build
Ship
Run
In most cases, a
dockerized app
acts as a normal native process within the host OS.
Popeye
the Sailor Man?
apt-get install
lxml
(Python)
gm
(Node.js)
libxml2-dev libxslt1-dev
graphicsmagick libgraphicsmagick1-dev
apt-get install
In most cases, a
dockerized app
acts as a normal native process within the host OS.
Like VM, a
dockerized app
encapsulates all dependencies through root file systems.
Want to learn more?
https://www.facebook.com/groups/docker.taipei/
Speech by Solomon Hykes (Founder & CTO):

Introduction to Docker
youtu.be/Q5POuMHxW-0

DockerCon 2014 Keynote
youtu.be/_DOXBVrlW78


10-minute Docker Tutorial
https://www.docker.com/tryit/

Docker Weekly
http://blog.docker.com/docker-weekly-archives/

Jérôme Petazzoni's slides
http://www.slideshare.net/jpetazzo
runs on...
dockerized
app
EXPOSE
ports
data
VOLUME
stdout
stderr
Linux kernel
≥ 3.8
x86_64
Docker engine
Linux container
Docker Hub
Build
Ship
Run
In most cases, a
dockerized app
acts as a normal native process within the host OS.
Ubuntu 14.04.1
wrk
(in
C
and
Lua
)
spray-httpserver
(in
Scala
)
Fluentd
(in
Ruby
)
Elasticsearch
(in
Java
)
Continuous
Integration/Deployment
Flow
Build / Package
make
ant
maven
gradle
pip
Artifact Repository
zip / tar.gz
jar / war / ear
rpm
deb
installer
Deployment
ad-hoc script
Capistrano
Fabric
Ansible

yum
apt
Configuration
ad-hoc script
Chef
Puppet
Ansible
Salt
Code / Config
git
rake
gem
bundle
npm
assets pipeline
Jenkins
Travis
Bamboo
Nexus
Artifactory
build phase
deployment phase
most related to Docker "ship" feature
legend:
pip install
npm install

coverage of
dependency
degree of
isolation
component
PL-level package manager
OS-level package manager
VM image
VM
PL-level virtual environment
alternatives
any
standard
?
heavyweight!!!
can be more
lightweight
?
choices:

bare metal
VPS
IaaS
PaaS
wrk
(in
C
and
Lua
)
spray-httpserver
(in
Scala
)
Elasticsearch
(in
Java
)
Fluentd
(in
Ruby
)
8080
log
9200
stdout
FROM
base image
FROM
base image
standard?
standard?
Full transcript