Saturday, March 19, 2016

Different VM types and Docker and Vagrant

http://stackoverflow.com/questions/16647069/should-i-use-vagrant-or-docker-for-creating-an-isolated-environment

"I'm the author of Docker.
The short answer is that if you want to manage machines, you should use Vagrant. And if you want to build and run applications environments, you should use Docker."
https://www.quora.com/What-is-the-difference-between-Docker-and-Vagrant-When-should-you-use-each-one

"The limitations of containers vs VM should be obvious now: You can't run completely different OS in containers like in VMs. However you can run different distros of Linux because they do share the same kernel. The isolation level is not as strong as in VM. In fact, there was a way for "guest" container to take over host in early implementations. Also you can see that when you load new container, the entire new copy of OS doesn't start like it does in VM. All containers share same kernel. This is why containers are light weight. Also unlike VM, you don't have to pre-allocate significant chunk of memory to VM because we are not running new copy of OS. This enables to run thousands of containers on one OS while sandboxing them which might not be possible to do if we were running separate copy of OS in its own VM."
"In summary: Vagrant is for managing machines, Docker is for building and running application environments."

"Vagrant was designed to manage virtual machines. Docker was designed to manage an application runtime. This means that Docker, by design, can interact with an application in richer ways, and has more information about the application runtime. The primitives in Docker are processes, log streams, environment variables and network links between components. The primitives in Vagrant are machines, block devices, and ssh keys. Vagrant simply sits lower in the stack, and the only way it can interact with a container is by pretending it's just another kind of machine, that you can "boot" and "log into"."
Container vs VM

https://www.docker.com/what-docker

"Lightweight

Containers running on a single machine all share the same operating system kernel so they start instantly and make more efficient use of RAM. Images are constructed from layered filesystems so they can share common files, making disk usage and image downloads much more efficient."
https://www.docker.com/use-cases/continuous-integration

http://superuser.com/questions/889472/docker-containers-have-their-own-kernel-or-not

http://web.archive.org/web/20150326185901/http://blog.dotcloud.com/under-the-hood-linux-kernels-on-dotcloud-part

https://github.com/opencontainers/runc



http://www.projectatomic.io/docs/filesystems/

"Supported Filesystems

A core part of the Docker model is the efficient use of layered images and containers based on images. To implement this Docker relies heavily on various filesystem features in the kernel. This document will explain how this works and give some advice in how to best use it"
http://superuser.com/questions/889472/docker-containers-have-their-own-kernel-or-not

https://www.upguard.com/articles/docker-vs-vagrant

http://stackoverflow.com/questions/16047306/how-is-docker-different-from-a-normal-virtual-machine?rq=1
"A full virtualized system usually takes minutes to start, LXC containers take seconds, and sometimes even less than a second.
There are pros and cons for each type of virtualized system. If you want full isolation with guaranteed resources, a full VM is the way to go. If you just want to isolate processes from each other and want to run a ton of them on a reasonably sized host, then LXC might be the way to go."

http://stackoverflow.com/questions/16647069/should-i-use-vagrant-or-docker-for-creating-an-isolated-environment

https://www.linux.com/news/software/applications/735734-forum-thread-a-comparison-of-vagrant-and-docker-

https://en.wikipedia.org/wiki/LXC

https://en.wikipedia.org/wiki/Virtual_machine

https://linuxcontainers.org/

https://linuxcontainers.org/lxc/news/

https://github.com/opencontainers/runc

http://web.archive.org/web/20150326185901/http://blog.dotcloud.com/under-the-hood-linux-kernels-on-dotcloud-part