Skip to content

cayohollanda/opencode-container

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opencode-container

A Docker container for running OpenCode with the Superpowers plugin.

Building the Image

docker build -t opencode .

Environment Variables

Variable Required Default Description
PARASAIL_API_KEY Yes - API key for Parasail
GITHUB_TOKEN Yes - GitHub token for gh CLI authentication
CODENOMAD_SERVER_PASSWORD Server mode - Password for CodeNomad server access
GIT_EMAIL No opencode@local Git commit email
GIT_NAME No OpenCode Git commit author name
MODE No server Run mode: server or interactive
CLI_PORT No 9898 Server port (server mode only)
CLI_HOST No 127.0.0.1 Interface to bind (server mode only)

Running the Container

Server Mode (Default)

Starts a CodeNomad server that exposes OpenCode over HTTP:

docker run -d \
  -e PARASAIL_API_KEY="your-api-key" \
  -e GITHUB_TOKEN="your-github-token" \
  -e CODENOMAD_SERVER_PASSWORD="your-password" \
  -e CLI_HOST="0.0.0.0" \
  -p 9898:9898 \
  -v /path/to/workspace:/home/opencode/workspace \
  opencode

Interactive Mode

Starts a bash shell for direct interaction:

docker run -it \
  -e PARASAIL_API_KEY="your-api-key" \
  -e GITHUB_TOKEN="your-github-token" \
  -e MODE=interactive \
  -v /path/to/workspace:/home/opencode/workspace \
  opencode

Once inside the container, you can run opencode directly.

Custom Port

docker run -d \
  -e PARASAIL_API_KEY="your-api-key" \
  -e GITHUB_TOKEN="your-github-token" \
  -e CODENOMAD_SERVER_PASSWORD="your-password" \
  -e CLI_HOST="0.0.0.0" \
  -e CLI_PORT=8080 \
  -p 8080:8080 \
  -v /path/to/workspace:/home/opencode/workspace \
  opencode

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Dockerfile 72.7%
  • Shell 27.3%