Skip to content

armgit / qm

Public Imported from GitHub
0

Multiplayer agent harness for work.

Skip dependency install scripts in the core and egress-proxy images (#2457)

Regan Bell14d28fa8121b
diff --git a/deploy/core/Dockerfile b/deploy/core/Dockerfile
index d35660561..a8ac5849f 100644
--- a/deploy/core/Dockerfile
+++ b/deploy/core/Dockerfile
@@ -18,8 +18,7 @@ COPY --from=wireproxy-build /out/wireproxy /usr/local/bin/wireproxy
WORKDIR /app
COPY package.json package-lock.json ./
-COPY .husky/install.mjs .husky/install.mjs
-RUN npm ci --omit=dev && npm run audit:prod \
+RUN npm ci --omit=dev --ignore-scripts && npm run audit:prod \
&& rm -rf /root/.npm /tmp/node-compile-cache
COPY --from=connector-sdk-build /app/.generated/connector-sdk ./.generated/connector-sdk
diff --git a/deploy/egress-proxy/Dockerfile b/deploy/egress-proxy/Dockerfile
index 86f9aa263..d8948c3cf 100644
--- a/deploy/egress-proxy/Dockerfile
+++ b/deploy/egress-proxy/Dockerfile
@@ -8,8 +8,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends iptables && rm
WORKDIR /app
COPY package.json package-lock.json ./
-COPY .husky/install.mjs .husky/install.mjs
-RUN npm ci --omit=dev
+RUN npm ci --omit=dev --ignore-scripts
COPY src ./src
COPY cli/src/canonical-json.ts cli/src/credential-paths.ts cli/src/scope-storage-key.ts cli/src/tool-descriptor.ts ./cli/src/
diff --git a/test/deploy-core-image.test.ts b/test/deploy-core-image.test.ts
index 9ec1eaad2..025387501 100644
--- a/test/deploy-core-image.test.ts
+++ b/test/deploy-core-image.test.ts
@@ -16,8 +16,8 @@ test("core deploy image includes git", () => {
);
assert.match(
dockerfile,
- /npm ci --omit=dev && npm run audit:prod/,
- "the production dependency audit is a build gate",
+ /npm ci --omit=dev --ignore-scripts && npm run audit:prod/,
+ "the production install skips dependency lifecycle scripts and the dependency audit is a build gate",
);
const packageJson = JSON.parse(readFileSync(join(repoRoot, "package.json"), "utf8")) as {
scripts: Record<string, string>;