diff --git a/server/container-baby.ts b/server/container-baby.ts index ff7a846..24e30c9 100644 --- a/server/container-baby.ts +++ b/server/container-baby.ts @@ -10,7 +10,7 @@ type RegistrySecret = string; const getToken = memoizeDownloader(_getToken); let squashfsDownloads = new Map>(); -const tmpDir = "cache/"; +const cacheDir = "cache/"; // { // const image = "gitea.nulo.in/nulo/zulip-checkin-cyborg"; // const tag = "latest"; @@ -27,7 +27,7 @@ export function parseImageRef(ref: string): { image: string; tag: string } { } export async function downloadImage(image: string, tag: string) { - await mkdir(tmpDir, { recursive: true }); + await mkdir(cacheDir, { recursive: true }); const manifest = await getManifest(image, tag); // sanity check @@ -75,7 +75,7 @@ async function saveSquashfs( let p = squashfsDownloads.get(key); if (!p) { p = (async () => { - const output = join(tmpDir, key); + const output = join(cacheDir, key); try { await access(output); // ya está cacheado