Skip to content

Commit 4a5e266

Browse files
Merge pull request #813 from aledbf/aledbf/up-cache-to
Enable --cache-to and --cache-from in devcontainer up
2 parents 099d347 + c1ee623 commit 4a5e266

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/spec-node/devContainersSpecCLI.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ function provisionOptions(y: Argv) {
123123
'mount': { type: 'string', description: 'Additional mount point(s). Format: type=<bind|volume>,source=<source>,target=<target>[,external=<true|false>]' },
124124
'remote-env': { type: 'string', description: 'Remote environment variables of the format name=value. These will be added when executing the user commands.' },
125125
'cache-from': { type: 'string', description: 'Additional image to use as potential layer cache during image building' },
126+
'cache-to': { type: 'string', description: 'Additional image to use as potential layer cache during image building' },
126127
'buildkit': { choices: ['auto' as 'auto', 'never' as 'never'], default: 'auto' as 'auto', description: 'Control whether BuildKit should be used' },
127128
'additional-features': { type: 'string', description: 'Additional features to apply to the dev container (JSON as per "features" section in devcontainer.json)' },
128129
'skip-feature-auto-mapping': { type: 'boolean', default: false, hidden: true, description: 'Temporary option for testing.' },
@@ -193,6 +194,7 @@ async function provision({
193194
mount,
194195
'remote-env': addRemoteEnv,
195196
'cache-from': addCacheFrom,
197+
'cache-to': addCacheTo,
196198
'buildkit': buildkit,
197199
'additional-features': additionalFeaturesJson,
198200
'skip-feature-auto-mapping': skipFeatureAutoMapping,
@@ -262,7 +264,7 @@ async function provision({
262264
buildxPlatform: undefined,
263265
buildxPush: false,
264266
buildxOutput: undefined,
265-
buildxCacheTo: undefined,
267+
buildxCacheTo: addCacheTo,
266268
additionalFeatures,
267269
skipFeatureAutoMapping,
268270
skipPostAttach,

0 commit comments

Comments
 (0)