When retrying to resolveOrCreateNetwork, retry with a valid network name

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
Guillaume Tardif 2024-12-24 10:47:32 +01:00 committed by Nicolas De loof
parent 8f644eea73
commit 571a1af013

View File

@ -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
}