mirror of
https://github.com/docker/compose.git
synced 2025-09-13 12:58:09 +02:00
define pull and no_cache from either service or flags values when building with bake
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
parent
fc66da06db
commit
bf6d7bf47e
@ -226,6 +226,9 @@ func (s *composeService) doBuildBake(ctx context.Context, project *types.Project
|
||||
image := api.GetImageNameOrDefault(service, project.Name)
|
||||
expectedImages[serviceName] = image
|
||||
|
||||
pull := service.Build.Pull || options.Pull
|
||||
noCache := service.Build.NoCache || options.NoCache
|
||||
|
||||
target := targets[serviceName]
|
||||
cfg.Targets[target] = bakeTarget{
|
||||
Context: build.Context,
|
||||
@ -243,8 +246,8 @@ func (s *composeService) doBuildBake(ctx context.Context, project *types.Project
|
||||
Target: build.Target,
|
||||
Secrets: toBakeSecrets(project, build.Secrets),
|
||||
SSH: toBakeSSH(append(build.SSH, options.SSHs...)),
|
||||
Pull: options.Pull,
|
||||
NoCache: options.NoCache,
|
||||
Pull: pull,
|
||||
NoCache: noCache,
|
||||
ShmSize: build.ShmSize,
|
||||
Ulimits: toBakeUlimits(build.Ulimits),
|
||||
Entitlements: entitlements,
|
||||
|
Loading…
x
Reference in New Issue
Block a user