Skip to content

Commit ffc48a8

Browse files
sjarmakclaude
andcommitted
perf: optimize Docker builds — remove redundant npm/claude-code, enable BuildKit
- Remove `npm install -g @anthropic-ai/claude-code` from 85 Dockerfiles (Harbor installs Claude Code at runtime via install-claude-code.sh.j2) - Remove `npm` apt package from 72 Dockerfiles where only needed for the redundant claude-code install (kept in 1 task: vscode-stale-diagnostics) - Add `--no-install-recommends` to 129 apt-get install commands - Add `rm -rf /var/lib/apt/lists/*` cleanup to 34 Dockerfiles missing it - Enable DOCKER_BUILDKIT=1 in _common.sh for parallel layer builds Estimated savings: ~1-2 hours per full benchmark run from build time alone. Also fixes test-unitgen-py-001 dpkg conflict where Debian's npm package (Node 18) conflicted with Harbor's NodeSource Node 22 install. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 09784e3 commit ffc48a8

File tree

130 files changed

+200
-469
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+200
-469
lines changed

benchmarks/ccb_build/camel-fix-protocol-feat-001/environment/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@ FROM eclipse-temurin:17-jdk
33
WORKDIR /workspace
44

55
# Install dependencies
6-
RUN apt-get update && apt-get install -y \
6+
RUN apt-get update && apt-get install -y --no-install-recommends \
77
git \
88
curl \
99
python3 \
1010
python3-pip \
11-
npm
12-
13-
# Install Claude Code CLI
14-
RUN npm install -g @anthropic-ai/claude-code
11+
&& rm -rf /var/lib/apt/lists/*
1512

1613
# Clone Apache Camel at pinned commit (camel-4.18.0)
1714
RUN git clone --filter=blob:none --no-checkout https://github.com/apache/camel.git . && \

benchmarks/ccb_build/cgen-deps-install-001/environment/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM ubuntu:22.04
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

5-
RUN apt-get update -qq && apt-get install -y -qq \
5+
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
66
python3 python3-pip git curl ca-certificates \
77
&& rm -rf /var/lib/apt/lists/*
88

benchmarks/ccb_build/codecoverage-deps-install-001/environment/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ FROM ubuntu:22.04
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

5-
RUN apt-get update -qq && apt-get install -y -qq \
5+
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
66
python3 python3-pip git curl ca-certificates \
77
&& rm -rf /var/lib/apt/lists/*
88

99
# Install .NET SDK
10-
RUN apt-get update -qq && apt-get install -y -qq wget && \
10+
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends wget && \
1111
wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb && \
1212
dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb && \
13-
apt-get update -qq && apt-get install -y -qq dotnet-sdk-8.0
13+
apt-get update -qq && apt-get install -y -qq --no-install-recommends dotnet-sdk-8.0
1414
# Copy repo
1515
COPY repo /app/repo
1616

benchmarks/ccb_build/django-dep-refactor-001/environment/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@ FROM golang:1.23-bookworm
33
WORKDIR /workspace
44

55
# Install dependencies
6-
RUN apt-get update && apt-get install -y \
6+
RUN apt-get update && apt-get install -y --no-install-recommends \
77
git \
88
curl \
9-
npm \
109
&& rm -rf /var/lib/apt/lists/*
1110

12-
# Install Claude Code CLI
13-
RUN npm install -g @anthropic-ai/claude-code
14-
1511
# Clone Flipt at pinned commit
1612
RUN git clone --filter=blob:none --no-checkout https://github.com/flipt-io/flipt.git . && \
1713
git checkout 3d5a345f94c2adc8a0eaa102c189c08ad4c0f8e8 && \

benchmarks/ccb_build/dotenv-expand-deps-install-001/environment/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ FROM ubuntu:22.04
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

5-
RUN apt-get update -qq && apt-get install -y -qq \
5+
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
66
python3 python3-pip git curl ca-certificates \
77
&& rm -rf /var/lib/apt/lists/*
88

99
# Install Node.js
1010
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
11-
apt-get install -y nodejs
11+
apt-get install -y --no-install-recommends nodejs
1212
# Copy repo
1313
COPY repo /app/repo
1414

benchmarks/ccb_build/dotnetkoans-deps-install-001/environment/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ FROM ubuntu:22.04
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

5-
RUN apt-get update -qq && apt-get install -y -qq \
5+
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
66
python3 python3-pip git curl ca-certificates \
77
&& rm -rf /var/lib/apt/lists/*
88

99
# Install .NET SDK
10-
RUN apt-get update -qq && apt-get install -y -qq wget && \
10+
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends wget && \
1111
wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb && \
1212
dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb && \
13-
apt-get update -qq && apt-get install -y -qq dotnet-sdk-8.0
13+
apt-get update -qq && apt-get install -y -qq --no-install-recommends dotnet-sdk-8.0
1414
# Copy repo
1515
COPY repo /app/repo
1616

benchmarks/ccb_build/envoy-grpc-server-impl-001/environment/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM ubuntu:22.04
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

5-
RUN apt-get update -qq && apt-get install -y -qq \
5+
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
66
git \
77
curl \
88
ca-certificates \

benchmarks/ccb_build/eslint-markdown-deps-install-001/environment/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ FROM ubuntu:22.04
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

5-
RUN apt-get update -qq && apt-get install -y -qq \
5+
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
66
python3 python3-pip git curl ca-certificates \
77
&& rm -rf /var/lib/apt/lists/*
88

99
# Install Node.js
1010
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
11-
apt-get install -y nodejs
11+
apt-get install -y --no-install-recommends nodejs
1212
# Copy repo
1313
COPY repo /app/repo
1414

benchmarks/ccb_build/flink-pricing-window-feat-001/environment/Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@ FROM eclipse-temurin:17-jdk
33
WORKDIR /workspace
44

55
# Install dependencies
6-
RUN apt-get update && apt-get install -y \
6+
RUN apt-get update && apt-get install -y --no-install-recommends \
77
git \
88
curl \
99
python3 \
1010
python3-pip \
11-
npm \
12-
maven
13-
14-
# Install Claude Code CLI
15-
RUN npm install -g @anthropic-ai/claude-code
11+
maven \
12+
&& rm -rf /var/lib/apt/lists/*
1613

1714
# Clone Apache Flink at pinned commit (release-2.2.0)
1815
RUN git clone --filter=blob:none --no-checkout https://github.com/apache/flink.git . && \

benchmarks/ccb_build/flipt-dep-refactor-001/environment/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@ FROM golang:1.23-bookworm
33
WORKDIR /workspace
44

55
# Install dependencies
6-
RUN apt-get update && apt-get install -y \
6+
RUN apt-get update && apt-get install -y --no-install-recommends \
77
git \
88
curl \
9-
npm \
109
&& rm -rf /var/lib/apt/lists/*
1110

12-
# Install Claude Code CLI
13-
RUN npm install -g @anthropic-ai/claude-code
14-
1511
# Clone Flipt at pinned commit
1612
RUN git clone --filter=blob:none --no-checkout https://github.com/flipt-io/flipt.git . && \
1713
git checkout 3d5a345f94c2adc8a0eaa102c189c08ad4c0f8e8 && \

0 commit comments

Comments
 (0)