From 7365917244ea791d304d5284a706aff09965636e Mon Sep 17 00:00:00 2001 From: Kevin De Jong Date: Wed, 29 Sep 2021 14:30:02 -0400 Subject: [PATCH] Fix build cache_from option Signed-off-by: Kevin De Jong --- pkg/compose/build.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/compose/build.go b/pkg/compose/build.go index 305099b68e..d52e4341a9 100644 --- a/pkg/compose/build.go +++ b/pkg/compose/build.go @@ -69,7 +69,6 @@ func (s *composeService) build(ctx context.Context, project *types.Project, opti buildOptions.Pull = options.Pull buildOptions.BuildArgs = mergeArgs(buildOptions.BuildArgs, args) buildOptions.NoCache = options.NoCache - opts[imageName] = buildOptions buildOptions.CacheFrom, err = buildflags.ParseCacheEntry(service.Build.CacheFrom) if err != nil { return err @@ -81,6 +80,8 @@ func (s *composeService) build(ctx context.Context, project *types.Project, opti Attrs: map[string]string{"ref": image}, }) } + + opts[imageName] = buildOptions } }