chore: use pnpm in dynamic container commands

Replace npx tsc with pnpm exec tsc in container entrypoint command,
and npm install -g with pnpm install -g in dynamic Dockerfile
generation. Variable names (npm, npmPackages) intentionally kept as
they refer to npm-registry packages, not the CLI.
This commit is contained in:
meeech
2026-04-14 00:29:15 -04:00
committed by gavrielc
parent 58420e16eb
commit 0b06343323

View File

@@ -298,7 +298,7 @@ async function buildContainerArgs(
args.push(
'-c',
'cd /app && npx tsc --outDir /tmp/dist 2>&1 >&2 && ln -sf /app/node_modules /tmp/dist/node_modules && node /tmp/dist/index.js',
'cd /app && pnpm exec tsc --outDir /tmp/dist 2>&1 >&2 && ln -sf /app/node_modules /tmp/dist/node_modules && node /tmp/dist/index.js',
);
return args;
@@ -322,7 +322,7 @@ export async function buildAgentGroupImage(agentGroupId: string): Promise<void>
dockerfile += `RUN apt-get update && apt-get install -y ${aptPackages.join(' ')} && rm -rf /var/lib/apt/lists/*\n`;
}
if (npmPackages.length > 0) {
dockerfile += `RUN npm install -g ${npmPackages.join(' ')}\n`;
dockerfile += `RUN pnpm install -g ${npmPackages.join(' ')}\n`;
}
dockerfile += 'USER node\n';