This commit is contained in:
Rodion Steshenko 2026-04-19 15:25:30 -05:00 committed by GitHub
commit 30c9fe7259
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -29,9 +29,17 @@ func (c *DockerCommand) RefreshNetworks() ([]*Network, error) {
ownNetworks := make([]*Network, len(networks))
for i, nw := range networks {
// NetworkList returns network.Summary which doesn't include container
// details. We need to inspect each network to populate Containers.
inspected, err := c.Client.NetworkInspect(context.Background(), nw.ID, network.InspectOptions{})
if err != nil {
c.Log.WithError(err).Warn("failed to inspect network " + nw.Name)
inspected = nw
}
ownNetworks[i] = &Network{
Name: nw.Name,
Network: nw,
Network: inspected,
Client: c.Client,
OSCommand: c.OSCommand,
Log: c.Log,