mirror of
https://github.com/docker/compose.git
synced 2025-07-22 05:04:27 +02:00
build: only print COMPOSE_BAKE recommendation when disabled
docker-compose now prints a recommendation to set COMPOSE_BAKE=true when service deps are used. However, when the user opts-in to bake, the recommendation is still printed. Only print the recommendation when bake is disabled. Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
parent
cae8e84636
commit
3292740c19
@ -100,10 +100,6 @@ func (s *composeService) build(ctx context.Context, project *types.Project, opti
|
|||||||
return imageIDs, err
|
return imageIDs, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if serviceDeps {
|
|
||||||
logrus.Infof(`additional_context with "service:"" is better supported when delegating build go bake. Set COMPOSE_BAKE=true`)
|
|
||||||
}
|
|
||||||
|
|
||||||
err = project.ForEachService(options.Services, func(serviceName string, service *types.ServiceConfig) error {
|
err = project.ForEachService(options.Services, func(serviceName string, service *types.ServiceConfig) error {
|
||||||
if service.Build == nil {
|
if service.Build == nil {
|
||||||
return nil
|
return nil
|
||||||
@ -128,6 +124,10 @@ func (s *composeService) build(ctx context.Context, project *types.Project, opti
|
|||||||
return s.doBuildBake(ctx, project, serviceToBuild, options)
|
return s.doBuildBake(ctx, project, serviceToBuild, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if serviceDeps {
|
||||||
|
logrus.Infof(`additional_context with "service:"" is better supported when delegating build go bake. Set COMPOSE_BAKE=true`)
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize buildkit nodes
|
// Initialize buildkit nodes
|
||||||
buildkitEnabled, err := s.dockerCli.BuildKitEnabled()
|
buildkitEnabled, err := s.dockerCli.BuildKitEnabled()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user