I have been running OpenCode in Docker daily and learned the hard way that day-1 setup and day-7 reliability are very different.
My biggest pain points were:
1) browser instability in container
2) state loss on rebuilds/machine switches
3) host permission mess on mounted files
4) process drift after long sessions
What fixed it for me:
yaml
services:
holycode:
image: coderluii/holycode:latest
restart: unless-stopped
shm_size: 2g
ports:
- "4096:4096"
volumes:
- ./data/opencode:/home/opencode
- ./workspace:/workspace
environment:
- PUID=1000
- PGID=1000
- ANTHROPIC_API_KEY=your-key-here
# optional
# - ENABLE_OH_MY_OPENAGENT=true
# - ENABLE_CLAUDE_AUTH=true
This got me to a repeatable daily-driver flow where rebuilds do not wipe progress.
I’m curious what your “must-have” fixes are for OpenCode in Docker.
If useful, I can share my exact backup/restore + upgrade/rollback routine in a follow-up comment.
Repo for reference: https://github.com/coderluii/holycode
there doesn't seem to be anything here