Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't see gateway IP address when running docker network inspect bridge #39793

Closed
ncabatoff opened this issue Aug 25, 2019 · 1 comment
Closed

Comments

@ncabatoff
Copy link

Description
I am trying to get the IP address of a gateway by running the "docker network inspect bridge" command but I don't see anything besides 'subnet'.

Steps to reproduce the issue:

  1. docker network inspect bridge

Describe the results you received:

||/ Name                                                                    Version                                  Architecture                             Description
+++-=======================================================================-========================================-========================================-===================================================================================================================================================
ii  docker-ce                                                               5:19.03.1~3-0~debian-stretch             arm64                                    Docker: the open-source application container engine
ii  docker-ce-cli                                                           5:19.03.1~3-0~debian-stretch             arm64                                    Docker CLI: the open-source application container engine
root@localhost:~# docker network inspect bridge
[
    {
        "Name": "bridge",
        "Id": "51041e3ff90377858533f684b4852ad3925e5f92b96cab5377e073236e9dab85",
        "Created": "2019-06-27T08:40:25.278700713Z",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.17.0.0/16"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "357970676d2d6ee8a3ccd790cfe1fa0d1d6d5aeead84753612907ff253f52687": {
                "Name": "trusting_goldwasser",
                "EndpointID": "466943f5f32f9f10e003bc9c491c3aa5c3701dee94133ac6f169339133374a4a",
                "MacAddress": "02:42:ac:11:00:02",
                "IPv4Address": "172.17.0.2/16",
                "IPv6Address": ""
            }
        },
        "Options": {
            "com.docker.network.bridge.default_bridge": "true",
            "com.docker.network.bridge.enable_icc": "true",
            "com.docker.network.bridge.enable_ip_masquerade": "true",
            "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
            "com.docker.network.bridge.name": "docker0",
            "com.docker.network.driver.mtu": "1500"
        },
        "Labels": {}
    }
]

Describe the results you expected:

||/ Name                                                                    Version                                  Architecture                             Description
+++-=======================================================================-========================================-========================================-===================================================================================================================================================
ii  docker-ce                                                               5:18.09.5~3-0~debian-stretch             arm64                                    Docker: the open-source application container engine
ii  docker-ce-cli                                                           5:18.09.5~3-0~debian-stretch             arm64                                    Docker CLI: the open-source application container engine
root@localhost:~# docker network inspect bridge
[
    {
        "Name": "bridge",
        "Id": "5c66feb77a90e1fe12ad77d51fcdc75d8f393b20f01510e5eeb1c35d17d0e15f",
        "Created": "2019-08-12T19:17:09.352936384Z",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.17.0.0/16",
                    "Gateway": "172.17.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "6ca56f59912f82c558534ce34d40ed31fc9ee28f9ed08dde18f71ccdeabf39f5": {
                "Name": "git-sync-308ebc9d-b195-7f7b-458f-a13bfecae8fa",
                "EndpointID": "4954ed7d193deec945e683324db20e0dddce449ef989a4961fbbcd590376bd2d",
                "MacAddress": "02:42:ac:11:00:02",
                "IPv4Address": "172.17.0.2/16",
                "IPv6Address": ""
            }
        },
        "Options": {
            "com.docker.network.bridge.default_bridge": "true",
            "com.docker.network.bridge.enable_icc": "true",
            "com.docker.network.bridge.enable_ip_masquerade": "true",
            "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
            "com.docker.network.bridge.name": "docker0",
            "com.docker.network.driver.mtu": "1500"
        },
        "Labels": {}
    }
]

Additional information you deem important (e.g. issue happens only occasionally):
This looks identical to #32648 but as @schmichael notes that was fixed in 18.06.1-ce or earlier. This appears to be a new manifestation in 19.03.1 (or earlier?)

Output of docker version:

root@localhost:~# docker version
Client: Docker Engine - Community
 Version:           19.03.1
 API version:       1.40
 Go version:        go1.12.5
 Git commit:        74b1e89
 Built:             Thu Jul 25 21:21:24 2019
 OS/Arch:           linux/arm64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.1
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.5
  Git commit:       74b1e89
  Built:            Thu Jul 25 21:18:55 2019
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.2.6
  GitCommit:        894b81a4b802e4eb2a91d1ce216b8817763c29fb
 runc:
  Version:          1.0.0-rc8
  GitCommit:        425e105d5a03fabd737a126ad93d62a9eeede87f
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Output of docker info:

root@localhost:~# docker info
Client:
 Debug Mode: false

Server:
 Containers: 1
  Running: 1
  Paused: 0
  Stopped: 0
 Images: 1
 Server Version: 19.03.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
 runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.4.167-1213-rockchip-ayufan-g34ae07687fce
 Operating System: Debian GNU/Linux 9 (stretch)
 OSType: linux
 Architecture: aarch64
 CPUs: 4
 Total Memory: 3.893GiB
 Name: localhost.localdomain
 ID: EII6:ESBN:Q2AQ:LW54:R62G:BK62:4NX6:XP7V:ELAM:XIYG:JVCL:3KRK
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Additional environment details (AWS, VirtualBox, physical, etc.):
physical

@ncabatoff
Copy link
Author

My mistake, I don't think this is version related after all. This is probably a dup of #26799. During first run post-install of either version I cited above, the Gateway field is missing. After a daemon restart or a reboot, it's present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants