Add multiple shells section to Docker Hub docs

This commit is contained in:
2026-04-10 08:56:07 +02:00
parent c0b887791f
commit 4b7b8a0c4b
+31
View File
@@ -32,6 +32,37 @@ docker run -it --rm \
Then run `opencode` when ready. Then run `opencode` when ready.
## Running Multiple Shells
Once opencode is running it takes over the terminal. To have a separate shell for `aws`, `git`, or other commands, run the container in the background and attach multiple times:
```bash
# Start in background
docker run -d --name devbox \
-e ANTHROPIC_API_KEY=your-key \
-e OPENCODE_PROVIDER=anthropic \
-v ~/projects:/workspace \
-v ~/.ssh:/home/developer/.ssh:ro \
joakimp/opencode-devbox:latest sleep infinity
# Shell 1: run opencode
docker exec -it devbox opencode
# Shell 2 (separate terminal): aws, git, etc.
docker exec -it devbox bash
# When done
docker rm -f devbox
```
With docker-compose this is simpler:
```bash
docker compose up -d
docker compose exec devbox opencode # terminal 1
docker compose exec devbox bash # terminal 2
```
## Environment Variables ## Environment Variables
### Provider Configuration ### Provider Configuration