You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,46 @@ $ bun install
86
86
$ bun dev
87
87
```
88
88
89
+
#### Docker Server Mode
90
+
91
+
You can optionally run the opencode server in a Docker container with the current directory mounted for isolation. When started with `--docker`, opencode securely syncs only its own provider credentials (from `auth.json`) into the container; no other local credentials or home directories are mounted.
92
+
93
+
```bash
94
+
# TUI with server in Docker (mounts $PWD to /workspace)
95
+
# Uses Docker Hub image by default: opencodeai/opencode:server
The default Docker image is `opencodeai/opencode:server`. The provided Dockerfile uses the `oven/bun` base image, adds essential tools (`curl`, `unzip`, `tar`, `git`, `nodejs`, `npm`) and Go (for optional `gopls`), installs the opencode server, and exposes port `8080`.
115
+
116
+
If you prefer to build the image manually:
117
+
118
+
```bash
119
+
docker build -t opencode:latest .
120
+
```
121
+
122
+
Or use the helper:
123
+
124
+
```bash
125
+
# Tags both opencodeai/opencode:server and opencode:local
126
+
./script/docker-build [Dockerfile] [context]
127
+
```
128
+
89
129
#### Development Notes
90
130
91
131
**API Client**: After making changes to the TypeScript API endpoints in `packages/opencode/src/server/server.ts`, you will need the opencode team to generate a new stainless sdk for the clients.
0 commit comments