Docker is a relatively new and rapidly growing project that allows to create very light “virtual machines”. The quotation marks here are important, what Docker allows you to create are not really virtual machines, they’re more akin to chroots on steroids, a lot of steroids. In this tutorial we'll explore what Docker can do for you and how does it do what it does.
Docker is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of operating-system-level virtualization on Linux.[5] Docker uses the resource isolation features of the Linux kernel such as cgroups and kernel namespaces, and a union-capable filesystem such as aufs and others[6] to allow independent "containers" to run within a single Linux instance, avoiding the overhead of starting and maintaining virtual machines
Docker uses a client-server architecture. The Docker client talks to the Dockerdaemon, which does the heavy lifting of building, running, and distributing your Docker containers. Both the Docker client and the daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate via sockets or through a RESTful API.
The Docker daemon is the persistent process that manages containers. Docker uses the same binary for both the daemon and client. To run the daemon you typedocker daemon.
groups
Kernel namespaces
A union-capable filesystem such as aufs
Containers date back to at least the year 2000 and FreeBSD Jails. Oracle Solaris also has a similar concept calledZones while companies such as Parallels, Google, and Docker have been working in such open-source projects as OpenVZand LXC (Linux Containers) to make containers work well and securely.
Comparison with Virtual Machines
Docker is lightweight and fast. It provides a viable, cost-effective alternative to hypervisor-based virtual machines. This is especially useful in high density environments: for example, building your own Cloud or Platform-as-a-Service. But it is also useful for small and medium deployments where you want to get more out of the resources you have.
VM hypervisors, such as Hyper-V, KVM, and Xen, all are "based on emulating virtual hardware. That means they’re fat in terms of system requirements."
Containers, however, use shared operating systems. That means they are much more efficient than hypervisors in system resource terms. Instead of virtualizing hardware, containers rest on top of a single Linux instance.
Containers, like VMs, are isolated (with one little caveat that I’ll discuss later). They also have an unique ID and a unique human-readable name. It’s necessary for containers to expose services, so Docker allows you to expose specific ports of a container (Ref: Pic below)..
In a nutshell, here's what Docker can do for you: It can get more applications running on the same hardware than other technologies; it makes it easy for developers to quickly create, ready-to-run containered applications; and it makes managing and deploying applications much easier.
http://www.zdnet.com/article/what-is-docker-and-why-is-it-so-darn-popular/
https://blog.talpor.com/2015/01/docker-beginners-tutorial/
https://en.wikipedia.org/wiki/Docker_(software)
https://docs.docker.com/engine/reference/commandline/daemon/
https://docs.docker.com/engine/understanding-docker/