Skip to content

Instantly share code, notes, and snippets.

@james2doyle
Last active February 15, 2026 20:08
Show Gist options
  • Select an option

  • Save james2doyle/3411c059ecd5c8569ec7fd54e57c95a5 to your computer and use it in GitHub Desktop.

Select an option

Save james2doyle/3411c059ecd5c8569ec7fd54e57c95a5 to your computer and use it in GitHub Desktop.

Revisions

  1. james2doyle revised this gist Feb 15, 2026. 2 changed files with 18 additions and 0 deletions.
    1 change: 1 addition & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -45,4 +45,5 @@ RUN opencode --version

    # The entrypoint defines the command that will run when the container starts
    # In this case, it executes the 'opencode' binary
    # You may need a "opencode.json" and a ".opencode/oh-my-opencode.jsonc" to control settings
    ENTRYPOINT ["opencode"]
    17 changes: 17 additions & 0 deletions oh-my-opencode.jsonc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    {
    "$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json",
    "agents": {
    "sisyphus": {
    "model": "openrouter/google/gemini-3-pro-preview"
    },
    "oracle": {
    "model": "openrouter/google/gemini-3-flash-preview"
    },
    "librarian": {
    "model": "openrouter/z-ai/glm-5"
    },
    "explore": {
    "model": "openrouter/minimax/minimax-m2.5"
    }
    }
    }
  2. james2doyle created this gist Feb 15, 2026.
    48 changes: 48 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,48 @@
    # Build the image with: docker build -t super-opencode .
    # Run the container with: docker run -it --volume="$PWD:/app" --workdir="/app" super-opencode

    # Use the official Node.js image based on Debian Bullseye (slim version for smaller size)
    FROM node:24.13.1-bullseye-slim

    # Set the working directory inside the container to /app
    WORKDIR /app

    # Install system dependencies required for building and running various tools
    # git: version control, curl: downloading files, make/g++: compiling native modules, unzip: extracting archives
    # ca-certificates: ensuring secure SSL connections
    # We clean up the apt cache afterwards to keep the image size small
    RUN apt-get update && apt-get install -y \
    git \
    curl \
    make \
    g++ \
    unzip \
    ca-certificates \
    && rm -rf /var/lib/apt/lists/*

    # Install the Bun runtime using the official installation script
    RUN curl -fsSL https://bun.sh/install | bash

    # Enable Corepack to manage package managers like pnpm and yarn
    RUN corepack enable pnpm

    # Install the opencode-ai CLI globally via npm
    RUN npm i -g opencode-ai

    # Use bunx to run the oh-my-opencode installer with specific flags
    # This configures the environment and enables opencode-zen while disabling other providers
    RUN /root/.bun/bin/bunx oh-my-opencode install --no-tui --claude=no --gemini=no --copilot=no --opencode-zen=yes

    # Create the authentication configuration file for OpenRouter
    # Note: The API key here is a placeholder and should be replaced or managed via environment variables
    RUN echo "{\"openrouter\": {\"type\": \"api\",\"key\": \"sk-or-v1-...\"}}" > ~/.local/share/opencode/auth.json

    # Verify the installation by checking the version of opencode
    RUN opencode --version

    # You may need to run the install before starting opencode
    # RUN CI=true pnpm install

    # The entrypoint defines the command that will run when the container starts
    # In this case, it executes the 'opencode' binary
    ENTRYPOINT ["opencode"]