Preparation study for Docker Event
Mulodo Open Study Group (MOSG) @Ho chi minh, Vietnam
http://www.meetup.com/Open-Study-Group-Saigon/events/229781420/
3. Docker allows you to package an
application with all of its dependencies
into a standardized unit for software
development.
What is “Docker”?
Docker containers wrap up a piece of
software in a complete filesystem that
contains everything it needs to run:
code, runtime, system tools, system
libraries – anything you can install on
a server. This guarantees that it will
always run the same, regardless of the
environment it is running in.
( https://www.docker.com/what-docker )
4. Docker VS Vagrant ??
Alternatively ?? NO!!
Docker : a kind of Linux container
Vagrant: Virtual machine manager
5. Docker VS Vagrant ??
Alternatively ?? NO!!
Docker : a kind of Linux container
Vagrant: Virtual machine manager
Docker
Work on Host OS
directory
OS of Docker and
Host OS is Same
using host’s OS
6. Docker VS Vagrant ??
Vagrant Emulated OS on Host
OS
Independent from
Host OS.
Virtual box
VMware...
7. Docker VS Vagrant ??
Vagrant Emulated OS on Host
OS
Independent from
Host OS.
where is Vagrant?
Virtual box
VMware...
8. Docker VS Vagrant ??
Vagrant Emulated OS on Host
OS
Independent from
Host OS.
where is Vagrant?
VM managemanet tool
use various VM with
same I/F.
Virtual box
VMware...
I/F
10. Today’s goal
Linux on Linux on OSX
OSX
Mac Book Air
Vagrant
Virtual Box
Linux
A typical use case on OSX
11. Today’s goal
Linux on Linux on OSX
OSX
Mac Book Air
Vagrant
Virtual Box
Linux
Docker
bin/libs
A typical use case on OSX
12. Today’s goal
Linux on Linux on OSX
A typical use case on OSX
OSX
Mac Book Air
Vagrant
Virtual Box
Linux
Docker
bin/libs
virtual machine (Linux)
virtual machine
(linux)
13. Rough history of container
chroot:(1979, 1983->BSD)
Use user own env.
change root directory.
ex) /home/nemo => /
jail : (2000)
Quarantine/restrictions of OS resources. (≒Namespace)
container : (2005, 2008->Linux)
Namespace (mount:2002.... PID:2008)
Cgroup (Quarantine/restrictions of HW resources)
LXC : (2014 (ver.1))
The one you love.
Docker : (2014 (ver.1))
The one you love.
14. Rough history of Hypervisor
VMware: (1999-)
The first product which used by *many*
engineer.(?)
Xen : (2002)
Use Linux kernel as Hypervisor
KVM : (2006)
Linux kernel include Xen like Hypervisor
Virtual Box : (2007)
proprietary software -> added OSS version.
BHyVe : (2011)
KVM for BSD, simple, small, cool(?)
24. Again..
$ vagrant destroy
$ vagrant up
$ vagrant ssh
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic
x86_64)
* Documentation: https://help.ubuntu.com/
Last login: Thu Mar 24 05:30:32 2016 from 10.0.2.2
vagrant@ubuntu-14:~$ docker version
Client:
Version: 1.10.3
API version: 1.22
Go version: go1.5.3
Git commit: 20f81dd
Built: Thu Mar 10 15:54:52 2016
OS/Arch: linux/amd64
Cannot connect to the Docker daemon. Is the docker daemon
running on this host?
vagrant@ubuntu-14:~$ sudo service docker status
docker start/running, process 8511
vagrant@ubuntu-14:~$