Presentation I presented at Codemotion 2015 in Rome.
It's about how to build and share reproducible, portable development environments with Vagrant and Docker
45. IF THE STACK DOESN’T CHANGE
TOO MUCH
JUST PROVIDE A READY MADE
VM MACHINE…
THE PROVISIONER WILL ONLY
CHANGE CONFIG FILES
46.
47. BUILD A NEW MACHINE IF
YOU HAVE TO UPGRADE/ADD
A SERVICE
48.
49. “Operating-system-level virtualisation is a
virtualisation method where the kernel of an
operating system allows for multiple isolated
user space instances, instead of just one.
Such instances, often called CONTAINERS, or
jails, may look and feel like a real server from
the point of view of its owners and users.”
http://en.wikipedia.org/wiki/Docker_%28software%29
57. DIFFERENCE BETWEEN A VM AND DOCKER
HOST OS
GUEST
OS
HYPERVISOR
BIN/
LIBS
APP A
APP C
APP B
GUEST
OS
BIN/
LIBS
APP Z
APP H
APP B
GUEST
OS
BIN/
LIBS
APP A
APP D
APP L
HOST OS
DOCKER ENGINE
BIN/
LIBS
APP A
BIN/
LIBS
APP Z
BIN/
LIBS
APP D
BIN/
LIBS
APP B{ {
VM
75. DockerFile
container image
commands while building the container
copy some content while building
the container
declare a volume: data accessible by other containers
and useful to mount a filesystem
}
76. DockerFile
container image
commands while building the container
copy some content while building
the container
declare a volume: data accessible by other containers
and useful to mount a filesystem
environment variable
}
77. DockerFile
container image
commands while building the container
copy some content while building
the container
declare a volume: data accessible by other containers
and useful to mount a filesystem
environment variable
container port exposed to other containers
}
78. DockerFile
container image
commands while building the container
copy some content while building
the container
declare a volume: data accessible by other containers
and useful to mount a filesystem
environment variable
container port exposed to other containers
the container command
executed when you run it
}
79. Build the container:
$: docker build -t node-app .
Run the container:
$: docker run -it node-app
107. DOCKER PROS
Matter of seconds to start an image
Can start multiple copies immediately
Central repo for images
You can go on staging and live from dev with the same
container
Versioning
108. DOCKER CONS
It really works really well just on Linux atm
It’s a young project, things change very fast
Lack of proper management tool
109. DOCKER CONS
It really works really well just on Linux atm
It’s a young project, things change very fast
Lack of proper management tool