NOTE: This post is outdated, because Docker developers changed the whole installation process and deprecated the Boot2Docker command line in favor of Docker Machine.
This post describes a basic overview of Docker’s architecture and explains other components which need to be installed to run Docker on Windows.
If you want to use this really useful and smart virtualization technology on Windows and you are a complete novice in it, you may feel a little bit confused from the installation process described on the official page.
The installation wizard requires installing Docker (naturally), Boot2Docker and VirtualBox. But what is this? I do not need any VirtualBox…
If you want to know why you are installing some other components on Windows, you need to understand the general Architecture Diagram on Figure 1.
The Docker consists of three basic components, i.e. Client, Docker host (particularly Docker daemon) and Registry.
The core of the architecture is a Docker daemon which controls all containers (running virtualized applications) and images (read-only stubs, ready to create containers from, downloaded from Registry).
The Docker daemon has no public interface and can be controlled only via a Docker client (and already known commands like
docker run etc.)
In other words, the Docker daemon is a backend application responsible for creating, editing and deleting containers and images. The Client is only our “hand” to control the Daemon.
Docker on Windows
The Docker daemon uses Linux-specific kernel features, so you cannot directly install and use it on Windows.
The Daemon runs natively on Linux only. This is the main reason of installing some other components on Windows (VirtualBox, Boot2Docker).
The Figure 2 shows how it works on Windows.
Only Docker clients run natively on Windows.
The Daemon (i.e. the core component) runs in a Linux Virtual Machine (i.e. Boot2Docker or any other Linux machine). So now you understand why you need to install the Virtual Box on Windows.
Each time you want to run your virtualized application, you have to run Boot2Docker (
boot2docker start), which starts a very tiny Linux machine on your computer. Your Docker client is connecting to it over the network. The network has been created between your host PC (your Windows operating system) and the Virtual Machine during setup of the Boot2Docker (
boot2docker init) in the Virtual Box setting.
- Installing Docker on Windows (a checkbox in the installation wizard) only means to install the Client.
- The Docker Engine does not support a Windows platform, so a Linux Virtual Machine needs to be used.
- Boot2Docker (B2D) is a lightweight Linux distribution based on Tiny Core Linux made specifically to run Docker containers. It contains already an installed and fully configured Daemon and a Client (in addition).
- VirtualBox is a virtualization software and a runtime environment for B2D ISO image.