NetworkList to NetworkInspect for ID search

Signed-off-by: kimdcottrell <me@kimdcottrell.com>
This commit is contained in:
kimdcottrell 2023-10-20 00:18:35 -04:00 committed by Nicolas De loof
parent c7e31a3c15
commit ee6e3c2a44
1 changed files with 3 additions and 3 deletions

View File

@ -1130,9 +1130,9 @@ func (s *composeService) resolveExternalNetwork(ctx context.Context, n *types.Ne
}
if len(networks) == 0 {
networks, err = s.apiClient().NetworkList(ctx, moby.NetworkListOptions{
Filters: filters.NewArgs(filters.Arg("id", n.Name)),
})
// in this instance, n.Name is really an ID
network, err := s.apiClient().NetworkInspect(ctx, n.Name, moby.NetworkInspectOptions{})
networks = append(networks, network)
if err != nil {
return err
}