Skip to content

Commit aaf6ff2

Browse files
jkyberneeesclaude
andcommitted
feat(docker): install gh CLI + add GH_TOKEN/git identity env vars
Add github-cli (gh) to the runtime image so the agent can clone, open PRs, and cut releases. Document GH_TOKEN (auto-used by gh) and the GIT_AUTHOR_*/GIT_COMMITTER_* commit-identity vars in .env.example, with a note to run `gh auth setup-git` for git push/clone over HTTPS. Verified: image builds with github-cli 2.83.0; `gh --version` works. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent b63bb3d commit aaf6ff2

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

docker/.env.example

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,23 @@ ODEK_BASE_URL=https://api.deepseek.com/v1
2222
# the "running without --sandbox" startup warning that run/repl print.
2323
ODEK_SUPPRESS_SANDBOX_WARNING=1
2424

25+
# ── GitHub CLI (gh) + git identity ───────────────────────────────────────
26+
# gh reads GH_TOKEN automatically — no `gh auth login` needed. Use a personal
27+
# access token (classic or fine-grained) with the scopes you need, e.g. repo,
28+
# read:org, workflow.
29+
GH_TOKEN=ghp_your_personal_access_token
30+
31+
# Commit identity. git uses these env vars directly, so no `git config` is
32+
# required for the agent's commits to be attributed correctly.
33+
GIT_AUTHOR_NAME=Your Name
34+
GIT_AUTHOR_EMAIL=you@example.com
35+
GIT_COMMITTER_NAME=Your Name
36+
GIT_COMMITTER_EMAIL=you@example.com
37+
#
38+
# `gh` commands (gh repo clone, gh pr, gh release, …) work out of the box with
39+
# GH_TOKEN. For plain `git push`/clone over HTTPS, have the bot run once:
40+
# gh auth setup-git # registers gh as git's credential helper via GH_TOKEN
41+
2542
# ── Telegram bot (only for the telegram-* profiles) ──────────────────────
2643
# Get a token from @BotFather; restrict to YOUR chat/user id.
2744
# ODEK_TELEGRAM_BOT_TOKEN=123456:ABC-your-bot-token

docker/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ RUN CGO_ENABLED=0 go build -ldflags "-s -w" -o /out/odek ./cmd/odek
1818
# ---- runtime stage ----
1919
FROM alpine:latest
2020
# Tooling the agent commonly needs inside the sandbox container.
21-
# Trim or extend this list to taste. (git is already included here.)
22-
RUN apk add --no-cache ca-certificates git bash coreutils curl jq
21+
# Trim or extend this list to taste. git + the GitHub CLI (`gh`, from the
22+
# Alpine community repo) are included so the agent can clone/PR/release.
23+
RUN apk add --no-cache ca-certificates git github-cli bash coreutils curl jq
2324

2425
# ── Adding extra dependencies the agent can use ──────────────────────────
2526
# The agent runs shell commands INSIDE this image, so any runtime or CLI it

0 commit comments

Comments
 (0)