Skip to content

Commit ee6e3c2

Browse files
kimdcottrellndeloof
authored andcommitted
NetworkList to NetworkInspect for ID search
Signed-off-by: kimdcottrell <[email protected]>
1 parent c7e31a3 commit ee6e3c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/compose/create.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,9 +1130,9 @@ func (s *composeService) resolveExternalNetwork(ctx context.Context, n *types.Ne
11301130
}
11311131

11321132
if len(networks) == 0 {
1133-
networks, err = s.apiClient().NetworkList(ctx, moby.NetworkListOptions{
1134-
Filters: filters.NewArgs(filters.Arg("id", n.Name)),
1135-
})
1133+
// in this instance, n.Name is really an ID
1134+
network, err := s.apiClient().NetworkInspect(ctx, n.Name, moby.NetworkInspectOptions{})
1135+
networks = append(networks, network)
11361136
if err != nil {
11371137
return err
11381138
}

0 commit comments

Comments
 (0)