Skip to content

Commit 867454b

Browse files
committed
Document GHCR package visibility and how to make it public
GHCR packages are private by default, which causes MANIFEST_UNKNOWN errors when pulling the prebuilt devcontainer image. Add documentation explaining the issue and providing instructions for making the package public via the GitHub UI or CLI. Also fix missing commas in the commented-out features block in devcontainer.json that would cause JSON parse errors if uncommented.
1 parent 0451e82 commit 867454b

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// "context": ".."
1313
// },
1414
// "features": {
15-
// "./claude-code": {}
16-
// "ghcr.io/devcontainers/features/docker-in-docker:2": {}
15+
// "./claude-code": {},
16+
// "ghcr.io/devcontainers/features/docker-in-docker:2": {},
1717
// "ghcr.io/devcontainers/features/common-utils:2": {},
1818
// "ghcr.io/anthropics/devcontainer-features/claude-code:1.0": {},
1919
// "ghcr.io/jsburckhardt/devcontainer-features/codex:latest": {}

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,43 @@ source .claude/activate.sh
5757

5858
See [.claude/README.md](.claude/README.md) for detailed information about the Claude Code configuration.
5959

60+
# Devcontainer Prebuilt Image
61+
62+
This template includes a CI workflow (`.github/workflows/devcontainer.yml`) that automatically builds and pushes a devcontainer image to GitHub Container Registry (GHCR) whenever `.devcontainer/` files change on `main`.
63+
64+
The main `.devcontainer/devcontainer.json` references this prebuilt image to avoid slow local builds:
65+
66+
```json
67+
"image": "ghcr.io/blooop/python_template/devcontainer:latest"
68+
```
69+
70+
## GHCR Package Visibility
71+
72+
**GHCR packages are private by default.** After the first CI push, you must manually make the package public or users (and tools like DevPod) will get a `MANIFEST_UNKNOWN` error when trying to pull the image.
73+
74+
### Making the package public
75+
76+
**Option 1: GitHub Web UI**
77+
78+
1. Go to your repository's package settings:
79+
`https://github.com/users/<username>/packages/container/<repo>%2Fdevcontainer/settings`
80+
2. Under "Danger Zone", click **Change visibility**
81+
3. Select **Public** and confirm
82+
83+
**Option 2: GitHub CLI**
84+
85+
```bash
86+
# Ensure your token has the write:packages scope
87+
gh auth refresh -s write:packages
88+
89+
# Set the package to public
90+
gh api --method PATCH /user/packages/container/<repo>%2Fdevcontainer -f visibility=public
91+
```
92+
93+
## Falling back to local builds
94+
95+
If the prebuilt image is unavailable, you can switch to local builds by editing `.devcontainer/devcontainer.json`: comment out the `"image"` line and uncomment the `"build"` and `"features"` blocks.
96+
6097
# Github setup
6198

6299
There are github workflows for CI, codecov and automated pypi publishing in `ci.yml` and `publish.yml`.

0 commit comments

Comments
 (0)