opensim-opencode is a specialized opencode container for the OpenSim AI stack.
It starts opencode in server mode and binds HTTP on container port 8998.
This is part of the opensim-stack and is intended to be used in conjunction with other parts of the stack. See Docs for full details.
- Runs
opencodein server mode (serverorserve, auto-detected) - Starts from
/workspaceand uses it as the project directory by default - Keeps persistent state/config/cache/data in dedicated volume mount points
- Supports the same OpenSim stack environment variable conventions where applicable
OPENCODE_HOST=0.0.0.0OPENCODE_PORT=${OPENCODE_PORT:-${OPENCODE_WEB_PORT:-8998}}OPENCODE_PROJECT_DIR=/workspace- Container HTTP listen port:
8998/tcp
opensim-workspace->/workspaceopencode-config->/root/.config/opencodeopencode-data->/root/.local/share/opencodeopencode-state->/root/.local/state/opencodeopencode-cache->/root/.cache/opencode
docker build -t opensim-opencode:local .docker run --rm \
-e OPENCODE_HOST=0.0.0.0 \
-e OPENCODE_PORT=8998 \
-e OPENCODE_SERVER_PASSWORD=change-me \
-p 8998:8998 \
-v opensim-workspace:/workspace \
-v opencode-config:/root/.config/opencode \
-v opencode-data:/root/.local/share/opencode \
-v opencode-state:/root/.local/state/opencode \
-v opencode-cache:/root/.cache/opencode \
opensim-opencode:localOPENCODE_SERVER_EXTRA_ARGSextra flags appended to server startup commandOPENCODE_SERVER_PASSWORDserver password value (available for server/auth wiring and stack pass-through)OPENCODE_MODEoverride mode, defaults toserve, withwebas an alternativeOPENCODE_PROJECT_DIRoverride startup directory (default/workspace)
Create/use a buildx builder once:
docker buildx create --name multiarch --use
docker buildx inspect --bootstrapBuild and push Linux AMD64 + ARM64:
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t bithatch/opensim-opencode:latest \
-t bithatch/opensim-opencode:$(date +%Y%m%d) \
--push \
.