Skip to content

Commit 118d4ce

Browse files
Disable cache on feature build when specified
1 parent 1da368b commit 118d4ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/spec-node/containerFeatures.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export async function extendImage(params: DockerResolverParameters, config: Subs
8282
args.push('--load'); // (short for --output=docker, i.e. load into normal 'docker images' collection)
8383
}
8484
}
85-
if (params.buildxCacheTo) {
85+
if (params.buildxCacheTo && !params.buildNoCache) {
8686
args.push('--cache-to', params.buildxCacheTo);
8787
}
8888

@@ -95,6 +95,9 @@ export async function extendImage(params: DockerResolverParameters, config: Subs
9595
'build',
9696
);
9797
}
98+
if (params.buildNoCache) {
99+
args.push('--no-cache');
100+
}
98101
for (const buildArg in featureBuildInfo.buildArgs) {
99102
args.push('--build-arg', `${buildArg}=${featureBuildInfo.buildArgs[buildArg]}`);
100103
}

0 commit comments

Comments
 (0)