Skip to content

Commit c22f361

Browse files
patnikoCopilot
andauthored
docs: replace non-existent ghcr.io/github/copilot-cli image with build instructions (#1189)
There is no official pre-built Docker image for the Copilot CLI. Update docs to provide a sample Dockerfile that builds from GitHub releases, along with build/push commands. Local examples use copilot-cli:latest, remote deployment examples (K8s, ACI) use your-registry/copilot-cli:latest. Fixes #897 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f7f9450 commit c22f361

2 files changed

Lines changed: 31 additions & 5 deletions

File tree

docs/setup/backend-services.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,40 @@ By default the headless server only accepts connections from loopback (`127.0.0.
7373
copilot --headless --host 0.0.0.0 --port 4321
7474
```
7575

76-
For production, run it as a system service or in a container:
76+
For production, run it as a system service or in a container.
77+
78+
> **Note:** There is no official pre-built Docker image for the Copilot CLI. You can build your own from the [GitHub releases](https://github.com/github/copilot-cli/releases):
79+
80+
```dockerfile
81+
FROM debian:bookworm-slim
82+
ARG COPILOT_VERSION=1.0.7
83+
RUN apt-get update \
84+
&& apt-get install -y --no-install-recommends ca-certificates wget \
85+
&& ARCH=$(dpkg --print-architecture) \
86+
&& case "${ARCH}" in amd64) COPILOT_ARCH="x64" ;; arm64) COPILOT_ARCH="arm64" ;; *) echo "Unsupported: ${ARCH}" && exit 1 ;; esac \
87+
&& wget -q "https://github.com/github/copilot-cli/releases/download/v${COPILOT_VERSION}/copilot-linux-${COPILOT_ARCH}.tar.gz" \
88+
&& tar -xzf "copilot-linux-${COPILOT_ARCH}.tar.gz" \
89+
&& mv copilot /usr/local/bin/ \
90+
&& rm "copilot-linux-${COPILOT_ARCH}.tar.gz" \
91+
&& apt-get purge -y wget && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
92+
ENTRYPOINT ["copilot"]
93+
```
94+
95+
```bash
96+
# Build the image
97+
docker build --build-arg COPILOT_VERSION=1.0.7 -t copilot-cli:latest .
98+
99+
# For remote deployments (Kubernetes, ACI, etc.), push to your registry
100+
docker tag copilot-cli:latest your-registry/copilot-cli:latest
101+
docker push your-registry/copilot-cli:latest
102+
```
77103

78104
```bash
79105
# Docker — must bind to 0.0.0.0 so the container's published port is reachable
80106
docker run -d --name copilot-cli \
81107
-p 4321:4321 \
82108
-e COPILOT_GITHUB_TOKEN="$TOKEN" \
83-
ghcr.io/github/copilot-cli:latest \
109+
copilot-cli:latest \
84110
--headless --host 0.0.0.0 --port 4321
85111

86112
# systemd
@@ -420,7 +446,7 @@ version: "3.8"
420446

421447
services:
422448
copilot-cli:
423-
image: ghcr.io/github/copilot-cli:latest
449+
image: copilot-cli:latest # See "Step 1" above for how to build this image
424450
command: ["--headless", "--host", "0.0.0.0", "--port", "4321"]
425451
environment:
426452
- COPILOT_GITHUB_TOKEN=${COPILOT_GITHUB_TOKEN}

docs/setup/scaling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ spec:
519519
spec:
520520
containers:
521521
- name: copilot-cli
522-
image: ghcr.io/github/copilot-cli:latest
522+
image: your-registry/copilot-cli:latest # See backend-services.md for how to build and push this image
523523
args: ["--headless", "--host", "0.0.0.0", "--port", "4321"]
524524
env:
525525
- name: COPILOT_GITHUB_TOKEN
@@ -576,7 +576,7 @@ flowchart TB
576576
```yaml
577577
containers:
578578
- name: copilot-cli
579-
image: ghcr.io/github/copilot-cli:latest
579+
image: your-registry/copilot-cli:latest # See backend-services.md for how to build and push this image
580580
command: ["copilot", "--headless", "--host", "0.0.0.0", "--port", "4321"]
581581
volumeMounts:
582582
- name: session-storage

0 commit comments

Comments
 (0)