Janshair Khan
Janshair Khan

Reputation: 2687

Understanding different Docker components

I've very simple theoretical questions. We used Docker in VirtualBox before Docker Desktop for Windows and Mac OS launched officially. In Virtual Box, we get a VM and we manage it using docker-machine command whereas we usually don't use docker-machine if we use Docker Desktop for Windows and Mac OS. Now keeping in the view of both versions:

  1. What is Docker Host and What it does in Both Versions?
  2. Docker Client is now referred as any terminal on Windows if we use Docker for Windows? (Do we now not need to configure our terminal as Docker Client to manage our containers?)
  3. Are the Docker Engine and Docker Daemon the same or different things in both versions?
  4. What is the role of MobyLinux VM in Hyper-V in Windows?
  5. How Docker isolates our application from the Host OS?

Any help will be appreciated.

Upvotes: 1

Views: 740

Answers (2)

Bernard
Bernard

Reputation: 17271

The docker host is where your containers run. As docker containers need to run under linux, if you're on a mac or windows you can only run them locally on your machine if you have a linux vm running.

  1. On VirtualBox, the docker host is an instance of boot2docker, which is a very lightweight linux. On docker4mac, the host is effectively your mac (each container actually runs under a "micro linux" called xhyve, but that's for the details)

  2. A docker client is simply any terminal that runs the Docker Client application, which is a CLI application that communicates with a Docker Daemon running inside the host.

  3. As far as I understand, the Docker engine and docker daemon are the same even in Docker 4 mac/windows.

  4. I don't know about MobyLinux

  5. Container isolation from the host (and other containers) is achieved using namespace, cgroup and private networks. See https://docs.docker.com/engine/security/security/ I however don't believe that security like cgroup are enabled by default.

All good questions...

Upvotes: 1

Haoming Zhang
Haoming Zhang

Reputation: 2842

Regarding to Docker Daemon, Docker Engine, Docker client, Docker host, and how Docker works, please refer to Understanding Docker doc and Docker Engine page. There have clearly architecture structure and explanation.

For question 4, Docker should runs in Linux, so Docker for Windows will create a Linux "MobyLinux" VM to run Docker components.

Upvotes: 1

Related Questions