jesseduffield / lazydocker

The lazier way to manage everything docker
MIT License
38.08k stars 1.21k forks source link

Add subnet and gateway to network config pane #562

Open unikitty37 opened 4 months ago

unikitty37 commented 4 months ago

Is your feature request related to a problem? Please describe. When running a Rails app that uses the better_errors gem, the gem needs to be given this range in the config in order for it to display when running under Docker, as otherwise it will only work on localhost.

I can't get this information through lazydocker, though: when I select a network in the left pane, it shows the network config on the right, but does not show the IP range assigned to the network — I need to run docker network inspect networkname outside of lazydocker to find that out.

Describe the solution you'd like The information is available at IPAM.Config.Subnet, and could be displayed in the config pane when a network is selected. (The gateway might be useful to some people, too, though it's not needed in my case…)

[
    {
        "Name": "networkname_default",
        "Id": "5a5730fc170cdafbd548b3dbb54365d5f73186bf9756185f968023aa04ed3412",
        "Created": "2024-07-18T12:11:48.881400701+01:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.20.0.0/16",
                    "Gateway": "172.20.0.1"
                }
            ]
        },

Describe alternatives you've considered Manually running docker network inspect networkname and picking through the output to find what I need. That's not very lazy, though :grin:

Additional context