What is the difference between Docker Host and Container

Kevin Rave picture Kevin Rave · Oct 23, 2015 · Viewed 8.9k times · Source

I started learning about Docker. But I keep getting confused often, even though I read it in multiple places.

Docker Host and Docker Container.

  • Docker Engine is the base Engine that handles the containers.
  • Docker Containers sit on top of Docker engine. This is created by recipes (text file with shell script). It pulls the image from the hub and you can install your stuff on it.
  • In a typical application environment, you will create separate containers for each piece of the system, Application Server, Database Server, Web Server, etc. (one container for each).
  • Docker Swarm is a cluster of containers.

Where does the Docker Host come in? Is this another word for Container or another layer where you can keep multiple containers together?

Sorry may be a basic question. I googled this, but no use.

Answer

Peter Lyons picture Peter Lyons · Oct 23, 2015

The docker host is the base traditional OS server where the OS and processes are running in normal (non-container) mode. So the OS and processes you start by actually powering on and booting a server (or VM) are the docker host. The processes that start within containers via docker commands are your containers.

To make an analogy: the docker host is the playground, the docker containers are the kids playing around in there.