What is the difference between Docker Host and Container

11,947

Solution 1

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.

Solution 2

Docker Host is the machine that Docker Engine is installed.

Solution 3

Here's a picture, which I find easier to understand than words. I found it here.

The Host is the machine managing the containers and images, where you actually installed Docker.

enter image description here

Solution 4

Docker host is the machine where you installed the docker engine. the docker container can be compared with a simple process running on that same docker host.

Solution 5

The Host is the underlying OS and it's support for app isolation (ie., process and user isolation via "containers." Docker provides an API that defines a method of application packaging and methods for working for the containers.

Host = container implementation Docker = app packaging and container management

Share:
11,947
Kevin Rave
Author by

Kevin Rave

Updated on June 04, 2022

Comments

  • Kevin Rave
    Kevin Rave almost 2 years

    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.

  • mblakesley
    mblakesley about 2 years
    This analogy isn't helping me understand port mapping. I understand the kids have ports, and the playground can have ports to contact things outside the playground, but why would the playground need ports to access the kids' ports?