5 ms·
Is there a "explain Docker to me like I'm 5" post? This seems like the old "I have problems with managing everything I need for my app so I'll just run docker
by rschmitty 13y ago
Is there a "explain Docker to me like I'm 5" post?
This seems like the old "I have problems with managing everything I need for my app so I'll just run docker containers. Now I have 2 problems"
- Ruska 13y agoThe slideshow on this page gives a decent overview: https://www.docker.io/learn_more/ https://www.docker.io/learn_more/
- peterwwillis 13y agoTo understand Docker [0] in a complete way you first have to understand a lot of other concepts. You need to understand what "linux containers" [1] are. To understand that you need to understand cgroups [2]. To understand cgroups you have to understand process groups/sessions [3] and namespace isolation [4], as well as how the kernel implements cgroups. [5] [6] You need to understand what chroot [7] is. (it just prepends a path to all pathname lookups for a process and its children) You need to understand what aufs [8] [9] is. To help understand aufs, you need to understand how union filesystems [10] work, how copy-on-write [11] works, and how virtual filesystems work [12] [13] [14]. You need to understand what rsync is [15]. To understand that you need to understand delta compression [16], and how rolling checksums [17] are used. You should also understand things like how bash works, how processes signal each other and return status on exit, how file descriptors (like stdin/stdout/stderr) work, and other basic UNIXy concepts, to understand how other parts of docker works. Docker is a frankenstein amalgamation of all these things, working together to allow you to basically run an arbitrary command in a way that is as isolated from your operating system as is practical while still remaining "light weight". Other solutions have other benefits or tradeoffs as evidenced here [18]. [0] http://www.activestate.com/blog/2013/06/solomon-hykes-explains-docker http://www.activestate.com/blog/2013/06/solomon-hykes-explai... [1] https://en.wikipedia.org/wiki/LXC https://en.wikipedia.org/wiki/LXC [2] http://blog.dotcloud.com/kernel-secrets-from-the-paas-garage-part-24-c http://blog.dotcloud.com/kernel-secrets-from-the-paas-garage... [3] https://en.wikipedia.org/wiki/Process_group https://en.wikipedia.org/wiki/Process_group [4] https://en.wikipedia.org/wiki/Namespace_isolation#NAMESPACE-ISOLATION https://en.wikipedia.org/wiki/Namespace_isolation#NAMESPACE-... [5] https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt [6] http://blog.dotcloud.com/under-the-hood-linux-kernels-on-dotcloud-part http://blog.dotcloud.com/under-the-hood-linux-kernels-on-dot... [7] https://lwn.net/Articles/252794/ https://lwn.net/Articles/252794/ [8] http://aufs.sourceforge.net/aufs.html http://aufs.sourceforge.net/aufs.html [9] http://blog.dotcloud.com/kernel-secrets-from-the-paas-garage-part-34-a http://blog.dotcloud.com/kernel-secrets-from-the-paas-garage... [10] https://en.wikipedia.org/wiki/Union_filesystem https://en.wikipedia.org/wiki/Union_filesystem [11] https://en.wikipedia.org/wiki/Copy-on-write https://en.wikipedia.org/wiki/Copy-on-write [12] https://en.wikipedia.org/wiki/Virtual_file_system https://en.wikipedia.org/wiki/Virtual_file_system [13] http://lwn.net/Articles/57369/ http://lwn.net/Articles/57369/ [14] http://www.win.tue.nl/~aeb/linux/lk/lk-8.html http://www.win.tue.nl/~aeb/linux/lk/lk-8.html [15] https://rsync.samba.org/how-rsync-works.html https://rsync.samba.org/how-rsync-works.html [16] https://en.wikipedia.org/wiki/Delta_encoding https://en.wikipedia.org/wiki/Delta_encoding [17] https://en.wikipedia.org/wiki/Rolling_hash https://en.wikipedia.org/wiki/Rolling_hash [18] https://en.wikipedia.org/wiki/Operating_system-level_virtualization#Implementations https://en.wikipedia.org/wiki/Operating_system-level_virtual...
- Shish2k 13y agoIf you happen to be a python dev: Docker is basically like virtualenv, but for everything instead of just for one aspect of one language
- tinco 13y agoThe Linux kernel has some features that make it possible to isolate a process from all (most) system resources, without actually running it inside a VM. Docker is a tool that makes it easy to launch such isolated processes. You just specify what the filesystem environment should be for the new process, and what process to run in a small file and off it goes. In theory this could make provisioning easier, having each application come in a Docker container that satisfies its own system level dependencies, and does its service level dependencies over connections to other containers/external hosts.