You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-31Lines changed: 13 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,48 +59,30 @@ See [.claude/README.md](.claude/README.md) for detailed information about the Cl
59
59
60
60
# Devcontainer
61
61
62
-
By default, the devcontainer builds locally from `.devcontainer/Dockerfile`. This works out of the box for all users, including forks and projects created from this template.
62
+
The devcontainer has three states:
63
63
64
-
## Switching to a prebuilt image (optional)
64
+
| State | When |`image`|`build`|`features`|
65
+
|---|---|---|---|---|
66
+
|**Template prebuilt** (default) | Fresh clones, after rename | template URL | commented | active |
67
+
|**Local build**| After `dev-use-local`| commented | active | active |
A CI workflow (`.github/workflows/devcontainer.yml`) automatically builds and pushes a devcontainer image to GHCR whenever `.devcontainer/` files change on `main`. The image is published as `ghcr.io/<owner>/<repo>/devcontainer:latest`, where `<owner>` is your GitHub username or organization and `<repo>` is the repository name (e.g. `ghcr.io/myuser/myproject/devcontainer:latest`).
70
+
By default, the devcontainer uses a prebuilt image from the template repository (`ghcr.io/blooop/python_template/devcontainer:latest`) for fast startup. This works immediately for new repos created from this template — no CI build needed.
67
71
68
-
You can migrate automatically with:
72
+
To switch to building locally from `.devcontainer/Dockerfile` (e.g. after customizing the Dockerfile):
69
73
70
74
```bash
71
-
pixi run dev-use-prebuilt
75
+
pixi run dev-use-local
72
76
```
73
77
74
-
Or manually:
75
-
76
-
1. Edit `.devcontainer/devcontainer.json`: comment out the `"build"` and `"features"` blocks, uncomment the `"image"` line
77
-
2. Update the image reference to match your repo: `ghcr.io/<owner>/<repo>/devcontainer:latest`
78
-
3. Push to `main` and wait for the CI workflow to complete. For new repos or forks where the workflow hasn't run yet, you can trigger it manually from the Actions tab or via `gh workflow run devcontainer.yml`
79
-
4.**Make the GHCR package public** (see below) — GHCR packages are private by default and will fail with `MANIFEST_UNKNOWN` otherwise
80
-
81
-
### Making the GHCR package public
82
-
83
-
**Option 1: GitHub Web UI**
84
-
85
-
1. Go to your repository's package settings:
86
-
- Personal repos: `https://github.com/users/<username>/packages/container/<repo>%2Fdevcontainer/settings`
2. Under "Danger Zone", click **Change visibility**
89
-
3. Select **Public** and confirm
90
-
91
-
**Option 2: GitHub CLI**
78
+
To switch to this repo's own prebuilt image (built by CI on each push to `main`):
92
79
93
80
```bash
94
-
# Ensure your token has the write:packages scope
95
-
gh auth refresh -s write:packages
96
-
97
-
# For personal repos:
98
-
gh api --method PATCH /user/packages/container/<repo>%2Fdevcontainer -f visibility=public
99
-
100
-
# For organization repos:
101
-
gh api --method PATCH /orgs/<org>/packages/container/<repo>%2Fdevcontainer -f visibility=public
81
+
pixi run dev-use-prebuilt
102
82
```
103
83
84
+
This detects the repo from git remote, updates `devcontainer.json` to use `ghcr.io/<owner>/<repo>/devcontainer:latest`, and attempts to make the GHCR package public. See the script output for manual steps if automatic visibility fails.
85
+
104
86
# Github setup
105
87
106
88
There are github workflows for CI, codecov and automated pypi publishing in `ci.yml` and `publish.yml`.
0 commit comments