replace direct uses of nat types for api/types/container aliases

Follow-up to 494677f93f, which added
the aliases, but did not yet replace our own use of the nat types.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-07-31 02:19:00 +02:00
parent 0a5fb23b35
commit d58dc493fe
33 changed files with 206 additions and 237 deletions

View File

@@ -14,7 +14,6 @@ import (
"github.com/docker/docker/daemon/network"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/docker/go-connections/nat"
containertypes "github.com/moby/moby/api/types/container"
networktypes "github.com/moby/moby/api/types/network"
)
@@ -60,7 +59,7 @@ func (daemon *Daemon) ContainerInspect(ctx context.Context, name string, options
Networks: apiNetworks,
}
ports := make(nat.PortMap, len(ctr.NetworkSettings.Ports))
ports := make(containertypes.PortMap, len(ctr.NetworkSettings.Ports))
for k, pm := range ctr.NetworkSettings.Ports {
ports[k] = pm
}