Skip to content

Commit c9323fd

Browse files
authored
Update Opencode example to use prebuilt images (#549)
* Update OpenCode example to use pre-built image This commit updates the examples/opencode/Dockerfile to use the cloudflare/sandbox:<version>-opencode image and removes the installation steps. It also regenerates the worker-configuration.d.ts file with latest wrangler. * Don't fail precommit if there are no files to lint This change passes the `--no-errors-on-unmatched` flag to biome check so that the tool doesn't give a non-zero exit code when there are no matching files to check.
1 parent 90e1751 commit c9323fd

5 files changed

Lines changed: 1194 additions & 45 deletions

File tree

examples/opencode/Dockerfile

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
FROM docker.io/cloudflare/sandbox:0.8.3
2-
3-
# Add opencode install location to PATH before installation
4-
ENV PATH="/root/.opencode/bin:${PATH}"
5-
6-
# Install OpenCode CLI
7-
RUN curl -fsSL https://opencode.ai/install -o /tmp/install-opencode.sh \
8-
&& bash /tmp/install-opencode.sh \
9-
&& rm /tmp/install-opencode.sh \
10-
&& opencode --version
1+
FROM docker.io/cloudflare/sandbox:0.8.3-opencode
112

123
# Clone sample project for the web UI to work with
134
RUN git clone --depth 1 https://github.com/cloudflare/agents.git /home/user/agents

examples/opencode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"deploy": "wrangler deploy",
99
"dev": "wrangler dev",
1010
"start": "wrangler dev",
11-
"types": "wrangler types",
11+
"types": "wrangler types --strict-vars=false",
1212
"typecheck": "tsc --noEmit"
1313
},
1414
"dependencies": {

0 commit comments

Comments
 (0)