Docker - (Virtual) Host (or Machine or Server) - Docker Type

Card Puncher Data Processing


A host in docker can be:

  • a machine where docker server run
  • or a network

This page is about the machine, to see the network, see the page Docker - Host Network.

An host (or machine) is:

  • a virtual host that you can see running in your virtual machine provider (such as virtual box).
  • is managed through the docker-machine executable (creation, start, stop,…)

The host operating system is boot2docker.

Docker Host Virtualbox


Environment variable

Windows DOS shell

docker-machine env
SET DOCKER_CERT_PATH=C:\Users\gerard\.docker\machine\machines\default
REM Run this command to configure your shell:
REM     @FOR /f "tokens=*" %i IN ('"C:\DockerToolbox\docker-machine.exe" env') DO @%i

Linux bash shell

docker-machine env --shell=bash
export DOCKER_HOST="tcp://"
export DOCKER_CERT_PATH="C:\Users\gerard\.docker\machine\machines\default"
export DOCKER_MACHINE_NAME="default"
# Run this command to configure your shell:
# eval $("C:\DockerToolbox\docker-machine.exe" env --shell=bash)


docker-machine ls
default            virtualbox   Timeout



The driver indicate the provider on which to create the machine (ie the virtual engine).


See the Full List

You can register an already existing docker host by passing the daemon url.

docker-machine create --driver none --url=tcp:// custombox
docker-machine ls
custombox   *        none      Running   tcp://


The environment variable DOCKER_MACHINE_NAME has the name of the host machine.

By default, you may find Moby because docker-compose comes from the Moby Project. This is the name that we will find in the host file (/etc/host) in the docker-compose service.

How to find your host name:

  • The DOCKER_MACHINE_NAME env variable

  • Otherwise you see it in the NAME column when you list your hosts. See list


Three ways to find the IP dependent of your configuration


On windows, you can use the name host.docker.internal to reach the host.


If you are using a NAT, to determine the Docker Windows host IP interface (By default, this is the interface named vEthernet (DockerNAT) on the IP

  • at the command line with netsh
netsh interface ip show addresses
# and to filter for one interface
netsh interface ip show addresses "vEthernet (DockerNAT)"
Configuration for interface "vEthernet (DockerNAT)"
    DHCP enabled:                         No
    IP Address:                 
    Subnet Prefix:               (mask
    InterfaceMetric:                      15

  • Windows graphically

Docker Host Ip Nat

Docker Machine

docker-machine ip default

The DOCKER_HOST environment variable contains also the IP adress of the host

This IP is assigned by the docker-machine create subcommand.

Info !

docker info                                                                                            
Containers: 35                                                                                           
 Running: 1                                                                                              
 Paused: 0                                                                                               
 Stopped: 34                                                                                             
Images: 45                                                                                               
Server Version: 1.12.3                                                                                   
Storage Driver: aufs                                                                                     
 Root Dir: /mnt/sda1/var/lib/docker/aufs                                                                 
 Backing Filesystem: extfs                                                                               
 Dirs: 186                                                                                               
 Dirperm1 Supported: true                                                                                
Logging Driver: json-file                                                                                
Cgroup Driver: cgroupfs                                                                                  
 Volume: local                                                                                           
 Network: bridge host null overlay                                                                       
Swarm: inactive                                                                                          
Runtimes: runc                                                                                           
Default Runtime: runc                                                                                    
Init Binary:                                                                                             
containerd version:                                                                                      
runc version:                                                                                            
init version:                                                                                            
Security Options:                                                                                        
Kernel Version: 4.4.27-boot2docker                                                                       
Operating System: Boot2Docker 1.12.3 (TCL 7.2); HEAD : 7fc7575 - Thu Oct 27 17:23:17 UTC 2016            
OSType: linux                                                                                            
Architecture: x86_64                                                                                     
CPUs: 2                                                                                                  
Total Memory: 7.79GiB                                                                                    
Name: default                                                                                            
ID: 6CCC:JOTU:XXK3:ZJV6:7QTA:Y5LZ:EUAM:D3VM:XTVA:NQOY:5M2Z:KSC5                                          
Docker Root Dir: /mnt/sda1/var/lib/docker                                                                
Debug Mode (client): false                                                                               
Debug Mode (server): true                                                                                
 File Descriptors: 23                                                                                    
 Goroutines: 41                                                                                          
 System Time: 2017-10-24T15:05:24.245401217Z                                                             
 EventsListeners: 0                                                                                      
Experimental: false                                                                                      
Insecure Registries:                                                                                                                                                                          
Live Restore Enabled: false                                                                              

where you can see:

Disk Location

Docker Storage Locations

Data Persistence

Changes outside of the /var/lib/docker and /var/lib/boot2docker directories will be lost after powering down or restarting the host.

More ? See local customisation with persistent partition

Discover More
Docker - Architecture

The docker architecture is composed of: an host where the daemon run a daemon that manage and run all Docker object (such as image and container) a registry to download and push image a docker...
Docker Shared Drive New Credentials
Docker - Bind mount

bind mount is type of mount. It's one of the three way on how you can persist data from a container. See The file or directory is referenced by its full or relative path on the host machine. The...
Card Puncher Data Processing
Docker - Boot2Docker

boot2docker/boot2dockerBoot2Docker is the kernel of the OS linux of the Docker Machine When you ssh in the host with docker-machine, you get the boot2docker prompt. tce-load...
Card Puncher Data Processing
Docker - Clean (Removing Image and Container)

Docker host disk sizing management. Docker stores all layers/images in its file formate (i.e. aufs) in default /var/lib/docker directory. Remove the container that where not used months ago See...
Card Puncher Data Processing
Docker - Context

where you get: the type (ie host) the endpoint the orchestrator is swarm
Docker Daemon
Docker - Daemon - dockerd

The daemon is: a self-sufficient runtime for containers. a background service running on the host that manages building, running and distributing Docker containers. The daemon creates and manages...
Card Puncher Data Processing
Docker - Data Persistence

mount a file or directory of the host into a container. volume: mount a file or directory of the host machine into a container located at /var/lib/docker/volumes/ : mount a file or directory of the...
Card Puncher Data Processing
Docker - Docker Root Dir (Docker Data Storage Path)

The docker root dir is the root path where all data docker is stored. Log into the host And select it where:
Card Puncher Data Processing
Docker - Host Environment ( OS )

Host environment variable A docker machine must have minimal OS environment value in order to function correctly. Output: The following list of environment variables are supported by the docker...
Card Puncher Data Processing
Docker - Host Network

An host net is a docker network. host machine The container’s network stack is not isolated from the Docker host. All containers in the host network are able to communicate with each other on the...

Share this page:
Follow us:
Task Runner