HUB
Sign inSign up
copilot-cli logo

swaleio/copilot-cli

By swaleio

•Updated 1 day ago

GitHub Copilot CLI, run unattended in Swale workflows. Backs the copilot-cli task.

Image
0

190

swaleio/copilot-cli repository overview

⁠copilot-cli

Swale-built image backing the copilot-cli task definition. It runs GitHub Copilot CLI⁠ once and unattended in a directory the caller names, and emits the agent's final answer as a task output. It is built to run that task and is not meant to be run on its own.

  • Base: node:24-trixie-slim
  • Installed: GitHub Copilot CLI from GitHub's npm package @github/copilot, unmodified, at the version pinned in the Dockerfile⁠, plus git and ripgrep
  • User: non-root swale (uid 1000)
  • Updates and telemetry: off (COPILOT_AUTO_UPDATE=false, COPILOT_TELEMETRY_DISABLED=true), so a task runs the version the image pins
  • WORKDIR /mnt/workspace, ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

⁠Invocation

The entrypoint takes no arguments. It reads the task's inputs from the platform's INPUT_* environment variables, changes into INPUT_DIRECTORY and runs copilot --output-format json --no-ask-user with the prompt as one argument and stdin closed:

Input envEffect
INPUT_PROMPTThe instructions, passed as a single --prompt. Required.
INPUT_DIRECTORYThe full path the agent works in. Required.
INPUT_MODELThe model, passed as --model. Required.
INPUT_GITHUB_TOKENExported as COPILOT_GITHUB_TOKEN: the caller's own GitHub token, for GitHub Copilot's models. Pass a secret.
INPUT_BASE_URLExported as COPILOT_PROVIDER_BASE_URL, with COPILOT_OFFLINE=true: a server that speaks OpenAI's chat completions API, used instead of GitHub Copilot.
INPUT_API_KEYExported as COPILOT_PROVIDER_API_KEY: the key for INPUT_BASE_URL's server. Refused without INPUT_BASE_URL. Pass a secret.
INPUT_PERMISSIONread: no edits, and only commands Copilot recognizes as read-only. edit (default): file edits too (--allow-tool=write). full: everything (--allow-all). Anything that would ask for approval is refused.
INPUT_RESULT_PATHWhen set, the final answer is also written to this file.
INPUT_MAX_MINUTESThe run stops after this many minutes (default 60) and the task fails.

⁠Output

After a successful run, the entrypoint appends

result=<the final answer as a JSON string>

to $WORKFLOW_TASK_OUTPUT. The consuming task must declare a result output.

⁠Tags

Each tag is the version of GitHub Copilot CLI the image packages, such as 1.0.119. A rebuild that keeps that version, to pick up a fixed base image or wrapper, adds -r1, -r2, and so on. A tag is never reused; latest follows the newest publish.

⁠Building

From the repository root:

docker build -t swaleio/copilot-cli:dev images/copilot-cli

Merging a change under images/copilot-cli publishes the image under its next tag; task definitions reference it by digest.


Built from images/copilot-cli⁠ in the swaleio/task-definitions⁠ repository. For how a task definition references an image, see the task definition reference⁠ in the Swale documentation⁠.

GitHub Copilot CLI is a product of GitHub. This image is built by Swale; GitHub does not build, endorse or support it.

The Dockerfile and entrypoint are covered by the MIT License⁠. GitHub Copilot CLI is not open source: GitHub licenses it under the GitHub Copilot CLI License, and your use of it is subject to that license. A copy is inside the image at /usr/share/licenses/github-copilot-cli/LICENSE.md; see Third-party software⁠.

This image also contains software from other projects, each under its own license. The license texts those projects ship are inside the image: /usr/share/doc/<package>/copyright for Debian packages, /usr/local/LICENSE for Node.js and the directory of each npm package under /usr/local/lib/node_modules. Source code for its GPL and LGPL components: https://snapshot.debian.org/package/<source-package>/<version>/. We also provide that source code on request: see Third-party software⁠.

Tag summary
Recent tags
Content type
Image
Digest
sha256:840083df9…
Size
398.3 MB
Last updated
1 day ago
docker pull swaleio/copilot-cli:latest