Skip to content

Commit 5dd63f0

Browse files
scuffiscuffi
andauthored
Add certificate addition to opencode container (#454)
Co-authored-by: scuffi <aferguson@cloudflare.com>
1 parent 8fcbcd1 commit 5dd63f0

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/sandbox/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,12 @@ ENTRYPOINT ["/container-server/sandbox"]
199199
# ============================================================================
200200
FROM runtime-base AS opencode
201201

202+
RUN --mount=type=secret,id=wrangler_ca \
203+
if [ -f /run/secrets/wrangler_ca ] && [ -s /run/secrets/wrangler_ca ]; then \
204+
cp /run/secrets/wrangler_ca /usr/local/share/ca-certificates/wrangler-dev-ca.crt && \
205+
update-ca-certificates; \
206+
fi
207+
202208
# Install OpenCode CLI via npm (avoids GitHub API rate limits)
203209
RUN npm i -g opencode-ai \
204210
&& opencode --version

packages/sandbox/scripts/docker-local.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ docker build \
2929
--platform linux/amd64 \
3030
--build-arg SANDBOX_VERSION="$VERSION" \
3131
-t "$IMAGE:$VERSION-opencode" \
32+
--secret id=wrangler_ca,src="${NODE_EXTRA_CA_CERTS:-/dev/null}" \
3233
.
3334

3435
docker build \

0 commit comments

Comments
 (0)