Skip to content

[FEATURE]: Provide git binaries in docker image for easier usage of web ui #27743

@thomashaertel

Description

@thomashaertel

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

The docker container images don't ship git binaries. Please add them to container image as default, so that web ui can be used out of the box.

Using the official docker image with docker compose to launch web ui by default you just need to pass parameters (e.g. "serve --hostname 0.0.0.0 --port 4096"). To prior install git binaries I needed to implement a workaround with resetting the entrypoint and adding a short shell script.

I use the following docker-compose.yaml:

services:
  opencode:
    container_name: opencode-ai
    image: ghcr.io/anomalyco/opencode:1.15.0
    ports:
      - "4096:4096"

    # Container entrypoint is already the opencode executable, so we only need to pass launch parameters for the web UI.
    # command: "serve --hostname 0.0.0.0 --port 4096"

    # To install the git executable for the web UI,
    # the entrypoint needs to be reset on startup.
    entrypoint: []
    command: ["sh", "-c", "command -v git >/dev/null 2>&1 || apk add --no-cache git; exec opencode serve --hostname 0.0.0.0 --port 4096"]

    working_dir: /workspace

    volumes:
      - ./volumes/data:/home/ubuntu/.local
      - ./volumes/config:/root/.config/opencode
      - ./volumes/projects:/workspace

    environment:
      - OPENCODE_SERVER_USERNAME=${OPENCODE_SERVER_USERNAME:-opencode}
      - OPENCODE_SERVER_PASSWORD=${OPENCODE_SERVER_PASSWORD:-}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions