Description
I'm trying to setup opencode web inside docker, but for some reason the project (working-dir) becomes always / (docker rootfs).
docker-compose.yaml
services:
opencode:
image: node:20-bookworm
working_dir: /workspace
command: >
sh -c "
npm install -g opencode-ai &&
opencode web --hostname 0.0.0.0 --port 4096 --cors '*'
"
ports:
- "ports:4096"
environment:
OPENCODE_SERVER_PASSWORD: "${OPENCODE_SERVER_PASSWORD:-}"
PWD: /workspace
HOME: /workspace
volumes:
- ../:/workspace
- $HOME/.local/share/opencode/auth.json:/root/.local/share/opencode/auth.json
- ./opencode.config.json:/root/.config/opencode/config.json
Plugins
No response
OpenCode version
1.4.7
Steps to reproduce
See docker-compose.yaml above
Screenshot and/or share link
Operating System
Ubuntu Linux 24 LTS + docker
Terminal
tried sh and bash (inside docker container)
Description
I'm trying to setup opencode web inside docker, but for some reason the project (working-dir) becomes always / (docker rootfs).
docker-compose.yaml
Plugins
No response
OpenCode version
1.4.7
Steps to reproduce
See docker-compose.yaml above
Screenshot and/or share link
Operating System
Ubuntu Linux 24 LTS + docker
Terminal
tried sh and bash (inside docker container)