Docker - Host Network

Card Puncher Data Processing


An host net is a docker network.

This page is not about the 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 host interfaces.

From a networking standpoint this is equivalent to multiple processes running on a host without containers. Because they are using the same host interfaces, no two containers are able to bind to the same TCP port.

Ie the host ntwork does not containerize the containers networking. The container is inside your host network.

From windows, you are unable to reach from the laptop a port in the container. The ports are not reachable. publishing a port (port mapping) is not possible. They are discarded when using host network mode. I have used port mapping without host network



You can see the home network object with network ls

docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
cb1ec3a96ce1        bridge              bridge              local
58beb8647a13        host                host                local
9d6438213fbb        none                null                local



To attach a container to the host network, you use the net options when running a container

docker run ^
    --network host ^

Attached to the host network

with Docker - Inspect

docker network inspect host
        "Name": "host",                                                                               
        "Id": "58beb8647a13f549fc1cfb4610e785d28f37536364119395ca1defa786a282a5",                     
        "Created": "2019-11-02T14:14:12.319852Z",                                                     
        "Scope": "local",                                                                             
        "Driver": "host",                                                                             
        "EnableIPv6": false,                                                                          
        "IPAM": {                                                                                     
            "Driver": "default",                                                                      
            "Options": null,                                                                          
            "Config": []                                                                              
        "Internal": false,                                                                            
        "Attachable": false,                                                                          
        "Ingress": false,                                                                             
        "ConfigFrom": {                                                                               
            "Network": ""                                                                             
        "ConfigOnly": false,                                                                          
        "Containers": {                                                                               
            "f3f569f57a5cc990dbc974e92035801455746533708209ca220e8b8413573776": {                     
                "Name": "samza",                                                                      
                "EndpointID": "1f7fffd9af5e5469bc17154683ef8ba5c1256ce3e574732cb76caa8195976c05",     
                "MacAddress": "",                                                                     
                "IPv4Address": "",                                                                    
                "IPv6Address": ""                                                                     
        "Options": {},                                                                                
        "Labels": {}                                                                                  

Documentation / Reference

Discover More
Card Puncher Data Processing
Docker - (Virtual) Host (or Machine or Server) - Docker Type

This page is the machine where the daemon is installed, called in docker documentation as the HOST Before a host was created through the docker-machine executable (creation, start, stop,...) but with...
Card Puncher Data Processing
Docker - Network

This article is the creation of a network (ie address space) between containers inside docker. After the docker installation you have 3 networks type by default. A container is created in the bridge...

Share this page:
Follow us:
Task Runner