opencode

reduardo7/opencode Docker Image

这是包含Git、GitHub CLI(gh)和GitLab CLI(glab)的OpenCode官方镜像,支持动态配置,用于代码版本控制与代码平台交互。

下载次数: 0状态:社区镜像维护者:reduardo7仓库类型:镜像最近更新:
下载命令
点击查看

OpenCode Docker

Docker image for https://github.com/anomalyco/opencode with dynamic configuration support for Git CLI tools.

Built on top of the https://github.com/anomalyco/opencode/pkgs/container/opencode and automatically rebuilt when a new upstream version is published.

Includes:

  • git — version control
  • gh — GitHub CLI
  • glab — GitLab CLI

Environment variables

VariableToolDescription
GIT_USER_NAMEgitCommit user name
GIT_USER_EMAILgitCommit email
GH_TOKENghGitHub authentication token
GH_GIT_PROTOCOLghGit protocol (ssh or https)
GLAB_TOKENglabGitLab authentication token
GLAB_GIT_PROTOCOLglabGit protocol (ssh or https)
GIT_SSH_KEYgitPrivate SSH key for Git authentication

Usage

Pull the image

bash
docker pull reduardo7/opencode:latest

Build locally (optional)

bash
docker build -t opencode-docker .

Basic example

bash
docker run -it --rm \
  -e GIT_USER_NAME="Your Name" \
  -e GIT_USER_EMAIL="you@email.com" \
  reduardo7/opencode:latest

With GitHub authentication

bash
docker run -it --rm \
  -e GIT_USER_NAME="Your Name" \
  -e GIT_USER_EMAIL="you@email.com" \
  -e GH_TOKEN="ghp_yourToken" \
  -e GH_GIT_PROTOCOL="ssh" \
  reduardo7/opencode:latest

With GitLab authentication

bash
docker run -it --rm \
  -e GIT_USER_NAME="Your Name" \
  -e GIT_USER_EMAIL="you@email.com" \
  -e GLAB_TOKEN="glpat-yourToken" \
  -e GLAB_GIT_PROTOCOL="ssh" \
  reduardo7/opencode:latest

With SSH key (without gh or glab)

bash
docker run -it --rm \
  -e GIT_USER_NAME="Your Name" \
  -e GIT_USER_EMAIL="you@email.com" \
  -e GIT_SSH_KEY="$(cat ~/.ssh/id_ed25519)" \
  ghcr.io/reduardo7/opencode:latest

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 opencode 镜像标签

docker pull docker.xuanyuan.run/reduardo7/opencode:<标签>

DockerHub 原生拉取命令

docker pull reduardo7/opencode:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告