diff --git a/cmd/compose/config.go b/cmd/compose/config.go index 0e50ee683..b4a9baedf 100644 --- a/cmd/compose/config.go +++ b/cmd/compose/config.go @@ -190,6 +190,10 @@ func runHash(ctx context.Context, dockerCli command.Cli, opts configOptions) err return err } + if len(services) == 0 { + services = project.ServiceNames() + } + sorted := services sort.Slice(sorted, func(i, j int) bool { return sorted[i] < sorted[j]