diff --git a/src/spec-node/containerFeatures.ts b/src/spec-node/containerFeatures.ts index e9091b179..e4155c3b6 100644 --- a/src/spec-node/containerFeatures.ts +++ b/src/spec-node/containerFeatures.ts @@ -80,6 +80,9 @@ export async function extendImage(params: DockerResolverParameters, config: Subs if (params.buildxCacheTo) { args.push('--cache-to', params.buildxCacheTo); } + if (params.additionalCacheFroms) { + params.additionalCacheFroms.forEach(cacheFrom => args.push('--cache-from', cacheFrom)); + } for (const buildContext in featureBuildInfo.buildKitContexts) { args.push('--build-context', `${buildContext}=${featureBuildInfo.buildKitContexts[buildContext]}`); diff --git a/src/spec-node/singleContainer.ts b/src/spec-node/singleContainer.ts index 0aa45fa22..18d3c7de0 100644 --- a/src/spec-node/singleContainer.ts +++ b/src/spec-node/singleContainer.ts @@ -196,6 +196,9 @@ async function buildAndExtendImage(buildParams: DockerResolverParameters, config if (buildParams.buildxCacheTo) { args.push('--cache-to', buildParams.buildxCacheTo); } + if (buildParams.additionalCacheFroms) { + buildParams.additionalCacheFroms.forEach(cacheFrom => args.push('--cache-from', cacheFrom)); + } args.push('--build-arg', 'BUILDKIT_INLINE_CACHE=1'); } else { args.push('build');