Browse Source

When retrying to resolveOrCreateNetwork, retry with a valid network name

Signed-off-by: Guillaume Tardif <[email protected]>
Guillaume Tardif 11 months ago
parent
commit
571a1af013
1 changed files with 1 additions and 1 deletions
  1. 1 1
      pkg/compose/create.go

+ 1 - 1
pkg/compose/create.go

@@ -1220,7 +1220,7 @@ func (s *composeService) ensureNetwork(ctx context.Context, project *types.Proje
 	if errdefs.IsConflict(err) {
 		// Maybe another execution of `docker compose up|run` created same network
 		// let's retry once
-		return s.resolveOrCreateNetwork(ctx, project, "", n)
+		return s.resolveOrCreateNetwork(ctx, project, name, n)
 	}
 	return id, err
 }