/host
This commit is contained in:
parent
424cd2a932
commit
7e45369681
|
|
@ -12,7 +12,7 @@ function containerPath(hostPath: string): string {
|
||||||
return "/sandlot" + hostPath.slice(`${home}/.sandlot`.length)
|
return "/sandlot" + hostPath.slice(`${home}/.sandlot`.length)
|
||||||
}
|
}
|
||||||
if (hostPath.startsWith(`${home}/dev`)) {
|
if (hostPath.startsWith(`${home}/dev`)) {
|
||||||
return "/dev-host" + hostPath.slice(`${home}/dev`.length)
|
return "/host" + hostPath.slice(`${home}/dev`.length)
|
||||||
}
|
}
|
||||||
return hostPath
|
return hostPath
|
||||||
}
|
}
|
||||||
|
|
@ -42,7 +42,7 @@ export async function ensure(log?: (msg: string) => void): Promise<void> {
|
||||||
// Create from scratch
|
// Create from scratch
|
||||||
const home = homedir()
|
const home = homedir()
|
||||||
log?.("Pulling image & creating container")
|
log?.("Pulling image & creating container")
|
||||||
await $`container run -d --name ${CONTAINER_NAME} -m 4G --mount type=bind,source=${home}/dev,target=/dev-host,readonly -v ${home}/.sandlot:/sandlot ubuntu:24.04 sleep infinity`.quiet()
|
await $`container run -d --name ${CONTAINER_NAME} -m 4G --mount type=bind,source=${home}/dev,target=/host,readonly -v ${home}/.sandlot:/sandlot ubuntu:24.04 sleep infinity`.quiet()
|
||||||
|
|
||||||
// Provision (as root)
|
// Provision (as root)
|
||||||
log?.("Installing packages")
|
log?.("Installing packages")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user