@@ -166,17 +166,17 @@ export async function unmountDevice(path: string, seenPaths = new Set<string>())
166
166
}
167
167
168
168
// Bind-mounts the BuildKit executor directory to the ephemeral disk.
169
- export async function mountExecutor ( ) {
169
+ export async function mountExecutor ( rootDir : string ) {
170
170
const mounts = await fsp . readFile ( '/proc/mounts' , 'utf8' )
171
- if ( mounts . includes ( '/var/lib/buildkit/ runc-stargz/executor' ) ) {
171
+ if ( mounts . includes ( ` ${ rootDir } / runc-stargz/executor` ) ) {
172
172
console . log ( `Executor dir is already mounted` )
173
173
return
174
174
}
175
175
176
176
await execa ( 'mkdir' , [ '-p' , '/mnt/executor' ] , { stdio : 'inherit' } )
177
- await execa ( 'rm' , [ '-rf' , '/var/lib/buildkit/ runc-stargz/executor' ] , { stdio : 'inherit' } )
178
- await execa ( 'mkdir' , [ '-p' , '/var/lib/buildkit/ runc-stargz/executor' ] , { stdio : 'inherit' } )
179
- await execa ( 'mount' , [ '--bind' , '/mnt/executor' , '/var/lib/buildkit/ runc-stargz/executor' ] , { stdio : 'inherit' } )
177
+ await execa ( 'rm' , [ '-rf' , ` ${ rootDir } / runc-stargz/executor` ] , { stdio : 'inherit' } )
178
+ await execa ( 'mkdir' , [ '-p' , ` ${ rootDir } / runc-stargz/executor` ] , { stdio : 'inherit' } )
179
+ await execa ( 'mount' , [ '--bind' , '/mnt/executor' , ` ${ rootDir } / runc-stargz/executor` ] , { stdio : 'inherit' } )
180
180
}
181
181
182
182
async function waitForDevice ( device : string ) {
0 commit comments