@@ -247,6 +247,8 @@ async function getFeaturesBuildOptions(params: DockerResolverParameters, devCont
247247 return undefined ;
248248 }
249249
250+ output . write ( `temporary dstFolder='${ dstFolder } '` ) ;
251+
250252 const buildStageScripts = await Promise . all ( featuresConfig . featureSets
251253 . map ( featureSet => multiStageBuildExploration ? featureSet . features
252254 . filter ( f => ( includeAllConfiguredFeatures || f . included ) && f . value )
@@ -284,10 +286,9 @@ async function getFeaturesBuildOptions(params: DockerResolverParameters, devCont
284286
285287 // When copying via buildkit, the content is accessed via '.' (i.e. in the context root)
286288 // When copying via temp image, the content is in '/opt/build-features'
287- const contentSourceRootPath = useBuildKitBuildContexts ? '.' : '/opt /build-features/' ;
288- const dockerfile = getContainerFeaturesBaseDockerFile ( )
289+ const contentSourceRootPath = useBuildKitBuildContexts ? '.' : '/tmp /build-features/' ;
290+ const dockerfile = getContainerFeaturesBaseDockerFile ( contentSourceRootPath , '/opt/build-features/' )
289291 . replace ( '#{nonBuildKitFeatureContentFallback}' , useBuildKitBuildContexts ? '' : `FROM ${ buildContentImageName } as dev_containers_feature_content_source` )
290- . replace ( '{contentSourceRootPath}' , contentSourceRootPath )
291292 . replace ( '#{featureBuildStages}' , getFeatureBuildStages ( featuresConfig , buildStageScripts , contentSourceRootPath ) )
292293 . replace ( '#{featureLayer}' , getFeatureLayers ( featuresConfig , containerUser , remoteUser , useBuildKitBuildContexts , contentSourceRootPath ) )
293294 . replace ( '#{containerEnv}' , generateContainerEnvs ( featuresConfig ) )
@@ -349,7 +350,7 @@ ARG _DEV_CONTAINERS_BASE_IMAGE=placeholder
349350 if ( ! useBuildKitBuildContexts ) {
350351 const buildContentDockerfile = `
351352 FROM scratch
352- COPY . /opt /build-features/
353+ COPY . /tmp /build-features/
353354 ` ;
354355 const buildContentDockerfilePath = cliHost . path . join ( dstFolder , 'Dockerfile.buildContent' ) ;
355356 await cliHost . writeFile ( buildContentDockerfilePath , Buffer . from ( buildContentDockerfile ) ) ;
0 commit comments