Docker

Docker Network

docker network 有三種模式 none,

打上 docker network ls

顯示如下:

NETWORK ID     NAME      DRIVER    SCOPE
430f7df300e4   bridge    bridge    local
9eec1e943774   host      host      local
3c5057c3a127   none      null      local

打上 docker network inspect none

顯示如下:

[
    {
        "Name": "none",
        "Id": "3c5057c3a127f6868eda780bdc7755ad57bd9187efca9452b38f254af676d8c7",
        "Created": "2021-06-08T08:03:14.1258993Z",
        "Scope": "local",
        "Driver": "null",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": []
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "26ada483f1efa15667383bed0266cde0f533ef29b6a3a1046f0d325a639bd9c4": {
                "Name": "epic_golick",
                "EndpointID": "1790ba8d095db67f4ca7d5ca9a215195a102ee4fcee9cb6435144dd8cc7a4059",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]

建立network driver docker network create --driver bridge my_bridge01

docker network ls 顯示如下:

NETWORK ID     NAME          DRIVER    SCOPE
430f7df300e4   bridge        bridge    local
9eec1e943774   host          host      local
dce4d1ab8734   my_bridge01   bridge    local
3c5057c3a127   none          null      local
comments powered by Disqus