mirror of
https://github.com/docker/compose.git
synced 2025-07-22 05:04:27 +02:00
Don't delete dependent services
Signed-off-by: Matthew Walowski <mattwalowski@gmail.com>
This commit is contained in:
parent
8967df7a91
commit
a345515f91
@ -190,20 +190,19 @@ func runHash(ctx context.Context, dockerCli command.Cli, opts configOptions) err
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(services) > 0 {
|
sorted := services
|
||||||
err = project.ForServices(services, types.IgnoreDependencies)
|
sort.Slice(sorted, func(i, j int) bool {
|
||||||
|
return sorted[i] < sorted[j]
|
||||||
|
})
|
||||||
|
|
||||||
|
for _, name := range sorted {
|
||||||
|
s, err := project.GetService(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
sorted := project.Services
|
|
||||||
sort.Slice(sorted, func(i, j int) bool {
|
|
||||||
return sorted[i].Name < sorted[j].Name
|
|
||||||
})
|
|
||||||
|
|
||||||
for _, s := range sorted {
|
|
||||||
hash, err := compose.ServiceHash(s)
|
hash, err := compose.ServiceHash(s)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user