Skip to content

Commit fd41857

Browse files
sjarmakclaude
andcommitted
fix: resolve Docker build failures for multi-repo and private sg-benchmarks tasks
Docker build containers can't access the host's git credential store, causing git clone failures for private sg-benchmarks repos. Three fixes applied: 1. Created 8 new base images (flask, requests, etcd, containerd, numpy, scikit-learn, pandas, rust) using local clone cache + COPY pattern 2. Rewrote 6 multi-repo task Dockerfiles to use multi-stage COPY --from instead of git clone during build 3. Added credential injection to prebuild_images.sh so the standard prebuild phase injects GitHub tokens via build-arg for any Dockerfile that clones from sg-benchmarks Also added run_all_sdlc_suites.sh for sequential multi-suite execution and prebuild_with_credentials.sh for standalone credential-based prebuild. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 29bf231 commit fd41857

File tree

19 files changed

+516
-18
lines changed

19 files changed

+516
-18
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM golang:1.23-bookworm
2+
3+
WORKDIR /workspace
4+
5+
RUN apt-get update && apt-get install -y --no-install-recommends \
6+
git \
7+
curl \
8+
&& rm -rf /var/lib/apt/lists/*
9+
10+
COPY _clone_cache/containerd-317286ac/ /workspace/
11+
12+
RUN cd /workspace && \
13+
git config user.email "agent@example.com" && \
14+
git config user.name "Agent"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM golang:1.23-bookworm
2+
3+
WORKDIR /workspace
4+
5+
RUN apt-get update && apt-get install -y --no-install-recommends \
6+
git \
7+
curl \
8+
&& rm -rf /var/lib/apt/lists/*
9+
10+
COPY _clone_cache/etcd-d89978e8/ /workspace/
11+
12+
RUN cd /workspace && \
13+
git config user.email "agent@example.com" && \
14+
git config user.name "Agent"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:3.11-slim
2+
3+
WORKDIR /workspace
4+
5+
RUN apt-get update && apt-get install -y --no-install-recommends \
6+
git \
7+
curl \
8+
&& rm -rf /var/lib/apt/lists/*
9+
10+
COPY _clone_cache/flask-798e006f/ /workspace/
11+
12+
RUN cd /workspace && \
13+
git config user.email "agent@example.com" && \
14+
git config user.name "Agent"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:3.11-slim
2+
3+
WORKDIR /workspace
4+
5+
RUN apt-get update && apt-get install -y --no-install-recommends \
6+
git \
7+
curl \
8+
&& rm -rf /var/lib/apt/lists/*
9+
10+
COPY _clone_cache/numpy-a639fbf5/ /workspace/
11+
12+
RUN cd /workspace && \
13+
git config user.email "agent@example.com" && \
14+
git config user.name "Agent"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:3.11-slim
2+
3+
WORKDIR /workspace
4+
5+
RUN apt-get update && apt-get install -y --no-install-recommends \
6+
git \
7+
curl \
8+
&& rm -rf /var/lib/apt/lists/*
9+
10+
COPY _clone_cache/pandas-41968da5/ /workspace/
11+
12+
RUN cd /workspace && \
13+
git config user.email "agent@example.com" && \
14+
git config user.name "Agent"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:3.11-slim
2+
3+
WORKDIR /workspace
4+
5+
RUN apt-get update && apt-get install -y --no-install-recommends \
6+
git \
7+
curl \
8+
&& rm -rf /var/lib/apt/lists/*
9+
10+
COPY _clone_cache/requests-421b8733/ /workspace/
11+
12+
RUN cd /workspace && \
13+
git config user.email "agent@example.com" && \
14+
git config user.name "Agent"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM rust:1.82-bookworm
2+
3+
WORKDIR /workspace
4+
5+
RUN apt-get update && apt-get install -y --no-install-recommends \
6+
git \
7+
curl \
8+
&& rm -rf /var/lib/apt/lists/*
9+
10+
COPY _clone_cache/rust-01f6ddf7/ /workspace/
11+
12+
RUN cd /workspace && \
13+
git config user.email "agent@example.com" && \
14+
git config user.name "Agent"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:3.11-slim
2+
3+
WORKDIR /workspace
4+
5+
RUN apt-get update && apt-get install -y --no-install-recommends \
6+
git \
7+
curl \
8+
&& rm -rf /var/lib/apt/lists/*
9+
10+
COPY _clone_cache/scikit-learn-cb7e82dd/ /workspace/
11+
12+
RUN cd /workspace && \
13+
git config user.email "agent@example.com" && \
14+
git config user.name "Agent"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

base_images/build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ IMAGES=(
5757
"Dockerfile.curl-09e25b9d ccb-repo-curl-09e25b9d"
5858
"Dockerfile.envoy-1d0ba73a ccb-repo-envoy-1d0ba73a"
5959
"Dockerfile.envoy-d7809ba2 ccb-repo-envoy-d7809ba2"
60+
"Dockerfile.flask-798e006f ccb-repo-flask-798e006f"
61+
"Dockerfile.requests-421b8733 ccb-repo-requests-421b8733"
62+
"Dockerfile.etcd-d89978e8 ccb-repo-etcd-d89978e8"
63+
"Dockerfile.containerd-317286ac ccb-repo-containerd-317286ac"
64+
"Dockerfile.numpy-a639fbf5 ccb-repo-numpy-a639fbf5"
65+
"Dockerfile.scikit-learn-cb7e82dd ccb-repo-scikit-learn-cb7e82dd"
66+
"Dockerfile.pandas-41968da5 ccb-repo-pandas-41968da5"
67+
"Dockerfile.rust-01f6ddf7 ccb-repo-rust-01f6ddf7"
6068
)
6169

6270
TOTAL_START=$SECONDS

0 commit comments

Comments
 (0)