Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opensim-opencode

Docker Hub

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.

What this image does

  • Runs opencode in server mode (server or serve, auto-detected)
  • Starts from /workspace and 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

Runtime defaults

  • OPENCODE_HOST=0.0.0.0
  • OPENCODE_PORT=${OPENCODE_PORT:-${OPENCODE_WEB_PORT:-8998}}
  • OPENCODE_PROJECT_DIR=/workspace
  • Container HTTP listen port: 8998/tcp

Required volume mappings

  • opensim-workspace -> /workspace
  • opencode-config -> /root/.config/opencode
  • opencode-data -> /root/.local/share/opencode
  • opencode-state -> /root/.local/state/opencode
  • opencode-cache -> /root/.cache/opencode

Build local image

docker build -t opensim-opencode:local .

Run local image

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:local

Optional environment variables

  • OPENCODE_SERVER_EXTRA_ARGS extra flags appended to server startup command
  • OPENCODE_SERVER_PASSWORD server password value (available for server/auth wiring and stack pass-through)
  • OPENCODE_MODE override mode, defaults to serve, with web as an alternative
  • OPENCODE_PROJECT_DIR override startup directory (default /workspace)

Build and publish multiarch image

Create/use a buildx builder once:

docker buildx create --name multiarch --use
docker buildx inspect --bootstrap

Build 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 \
  .

About

A Docker image for opencode, built specifically for the OpenSimulate AI Stack. Open code connects to AI providers, manages models, and talks to the OpenSimulator AI stack MCP servers such as console2mcp and metaverse2mcp

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages