45
Docker Please contain your excitement Docker Please contain your excitement John Leach [email protected] @johnleach Brightbox www.brightbox.com

Docker: please contain your excitement

  • Upload
    johnnnl

  • View
    75

  • Download
    1

Embed Size (px)

Citation preview

DockerPlease contain your

excitement

DockerPlease contain your

excitementJohn Leach

[email protected]@johnleach

Brightboxwww.brightbox.com

VirtualisationVirtualisation

Host hardware

Host kernel

Virtual machine process

Virtual hardware

Virtual machine kernel

Your application

DockerDocker

Host hardware

Host kernel

Your application

Linux processesLinux processes

Host hardware

Host kernel

application1 application2 application3

Linux NamespacesLinux Namespaces

Host hardware

Host kernel

application1 application2 application3

Physical RAM

process

filesystem

process process

network

Physical RAM

process

filesystem

Logical RAM

process process

Logical RAM Logical RAM

network

Physical RAM

process

filesystem

Logical RAM

process process

Logical RAM Logical RAM

network

FS namespace net namespaceFS namespace net namespace FS namespace net namespace

Network per processNetwork per process

Filesystem per processFilesystem per process

Filesystem per processFilesystem per process

unshare commandunshare command

UTS NamespaceUTS Namespace

Network NamespaceNetwork Namespace

Process NamespaceProcess Namespace

Mount NamespaceMount Namespace

User NamespaceUser Namespace

IPC NamespaceIPC Namespace

nsenternsenter

Inter-namespace communication

Inter-namespace communication

cgroupscgroups

Namepaces + cgroupsNamepaces + cgroups

How can we bring this all together?

LXC – Linux ContainersLXC – Linux Containers

Docker vs. LXCDocker vs. LXC

What makes Docker different?

DockerDocker

Docker imagesDocker images

Docker Images: Layers Docker Images: Layers

511136ea3c5a/

f3c84ac3a053/

q1a958a24818/

9fec74352904/

d0955f21bf24/

Container layer a65ee08f6/

Overlay fs

Hard linked together

Process

Container layersContainer layers

docker commitdocker commit

docker commitdocker commit

docker savedocker save

DockerfileDockerfileFROM ubuntu

RUN apt-get update -qqy

RUN apt-get install -qqy cowsay

ENV MESSAGE “nothing to say”

CMD sh -c "/usr/games/cowsay $MESSAGE"

Docker Images: Layers Docker Images: Layers

511136ea3c5a/

f3c84ac3a053/

q1a958a24818/

9fec74352904/

d0955f21bf24/

Overlay fs

Hard linked together

FROM ubuntu

RUN apt-get update -qqy

RUN apt-get install -qqy cowsay

ENV MESSAGE “nothing to say”

CMD sh -c "/usr/games/cowsay $MESSAGE"

docker pushdocker push

docker pulldocker pull

NetworkingNetworking

Persistent storage with Volumes

Persistent storage with Volumes

Service discoveryService discovery

The Future of DockerThe Future of Docker

DockerPlease contain your

excitement

DockerPlease contain your

excitementJohn Leach

[email protected]@johnleach

Brightboxwww.brightbox.com