Skip to content

Commit 5cd4a8a

Browse files
ci(devcontainer): use prebuilt image instead of broken Dockerfile build
The devcontainer image build fails on main: the Dockerfile does `COPY requirements.txt`, but that file was removed when the repo moved its dependencies to pyproject.toml, so there is nothing to copy. Switch devcontainer.json to pull the upstream mcr.microsoft.com/devcontainers/python image and install pre-commit/ruff/uv in postCreateCommand. Fully within .json so it stays keeper-safe; the now-unused Dockerfile can be dropped in a follow-up once the keeper accepts the Dockerfile filename (#228).
1 parent 66ff6b5 commit 5cd4a8a

1 file changed

Lines changed: 19 additions & 15 deletions

File tree

‎.devcontainer/devcontainer.json‎

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
{
22
"name": "Python 3",
3-
"build": {
4-
"dockerfile": "Dockerfile",
5-
"context": "..",
6-
"args": {
7-
// This repo tracks the latest-and-greatest CPython on the newest
8-
// stable Debian. The devcontainer base images are published per
9-
// CPython minor version on Debian 13 "Trixie" (3.11-trixie ...
10-
// 3.14-trixie); there is no floating `3-trixie` tag, so bump this
11-
// to the newest available when a new stable CPython ships.
12-
// NOTE: these images do not publish free-threaded (`t`) variants,
13-
// so 3.14t cannot be selected via the tag alone.
14-
"VARIANT": "3.14-trixie"
15-
}
16-
},
173

18-
"postCreateCommand": "zsh .devcontainer/post_install",
4+
// Use a prebuilt dev container image instead of building from a local
5+
// Dockerfile. The repo migrated its dependencies to pyproject.toml, so the
6+
// old Dockerfile's `COPY requirements.txt` step no longer had a file to copy
7+
// and the image build failed. The upstream images already ship Python + a
8+
// full toolchain, so pulling one is both faster and less to maintain.
9+
//
10+
// This repo tracks the latest-and-greatest CPython on the newest stable
11+
// Debian. Images are published per CPython minor version on Debian 13
12+
// "Trixie" (3.11-trixie ... 3.14-trixie); bump this to the newest available
13+
// when a new stable CPython ships.
14+
// NOTE: these images do not publish free-threaded (`t`) variants, so 3.14t
15+
// cannot be selected via the tag alone -- but the repo's `.python-version`
16+
// pins 3.14t, and `uv run`/`uv sync` in the container honor it, so uv gives
17+
// contributors free-threaded 3.14t regardless of the base tag.
18+
"image": "mcr.microsoft.com/devcontainers/python:3.14-trixie",
19+
20+
// Install the tools post_install and CI expect (pre-commit + ruff), plus uv
21+
// for the free-threaded workflow above, then run the existing setup script.
22+
"postCreateCommand": "pipx install pre-commit ruff uv && zsh .devcontainer/post_install",
1923

2024
// Configure tool-specific properties.
2125
"customizations": {

0 commit comments

Comments
 (0)