Skip to content

Commit 278d25d

Browse files
committed
examples/think: install Node 22 in the container image
The think example's exec tool advertises the container backend as "Full Linux userland: git, npm, node, the test runner", which is what the model reads when it picks a backend. The image actually only had `git` — `npm test` and `node script.mjs` would land on a "command not found" the first time the model fell through from the shell backend. Mirror examples/container's Dockerfile: pull Node 22 LTS from NodeSource, keep the standard NodeSource key dance, drop the apt lists afterwards. ~120 MB heavier; worth it for an example whose whole job is running real build/test workflows.
1 parent c4bb97f commit 278d25d

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

examples/think/Dockerfile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,23 @@ FROM ghcr.io/cloudflare/workspace-wsd-linux-x64:0.0.0-alpha.6 AS wsd
1212

1313
FROM debian:stable-slim
1414

15+
# We install Node 22 (LTS) from NodeSource so the agent has
16+
# `node`, `npm`, and `npx` on $PATH for the typical "clone the
17+
# repo, npm install, npm test" loop. curl + gnupg are pulled in
18+
# just for the NodeSource key dance and stay in the image; they
19+
# come in handy for ad-hoc agent commands too. The cost is ~120 MB
20+
# of layer over the base; acceptable for an example whose whole
21+
# point is running real build/test workflows.
1522
RUN apt-get update \
1623
&& apt-get install -y --no-install-recommends \
17-
fuse3 libfuse2t64 ca-certificates git \
24+
fuse3 libfuse2t64 ca-certificates curl gnupg git \
25+
&& mkdir -p /etc/apt/keyrings \
26+
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
27+
| gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
28+
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" \
29+
> /etc/apt/sources.list.d/nodesource.list \
30+
&& apt-get update \
31+
&& apt-get install -y --no-install-recommends nodejs \
1832
&& rm -rf /var/lib/apt/lists/*
1933

2034
COPY --from=wsd /usr/local/bin/wsd /usr/local/bin/wsd

0 commit comments

Comments
 (0)