Repository navigation
fix: move devcontainer to the shared python_template image (drops emSign G3) - #17
Merged
Merged
Conversation
The shared image carries the ca-certificates fix that drops emSign ECC Root CA - G3 (CVE-2026-111943). Port python_template's .devcontainer/ and delete the private Dockerfile.
The shared image's pixi rewrote the v6 lock in post-create, so every new dl workspace started dirty. This is the format v7 lock; the package versions do not change.
post-create now runs `pixi install --frozen`, so a new dl workspace does not rewrite pixi.lock.
Reviewer's GuideThe PR replaces the old private Ubuntu/pixi devcontainer build with the shared python_template image, moves common tooling and CA remediation into that image, adds the template’s frozen post-create flow plus local Claude Code feature support, and regenerates pixi.lock for pixi 0.83; package code and dependency versions remain unchanged. Sequence diagram for frozen devcontainer creationsequenceDiagram
actor Developer
participant Devcontainer as Devcontainer
participant Image as SharedImage
participant PostCreate as post-create.sh
participant Pixi as pixi
participant Host as HostClaudeConfig
Developer->>Devcontainer: Create workspace
Devcontainer->>Image: Pull ghcr.io/blooop/python_template/devcontainer:latest
Devcontainer->>Host: init-host.sh
Host-->>Devcontainer: ~/.claude exists
Devcontainer->>PostCreate: Run post-create.sh
PostCreate->>PostCreate: ssh-keyscan
PostCreate->>Pixi: pixi install --frozen
Pixi-->>PostCreate: Environment installed without rewriting pixi.lock
Host-->>Devcontainer: Bind-mount ~/.claude
Flow diagram for the devcontainer base image transitionflowchart LR
Old[Private Dockerfile image\nold Ubuntu and pixi]
Shared[python_template shared image\nupdated Ubuntu and pixi]
RepoConfig[dbw devcontainer.json]
Clean[Clean workspace after creation]
Old -. replaced by .-> Shared
Shared -->|already includes common-utils and CA remediation| RepoConfig
RepoConfig -->|post-create.sh runs pixi install --frozen| Clean
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
devcontainer.json bind-mounts ~/.config/gh, and docker refuses a bind source that does not exist, so a host that never ran `gh auth login` could not create the container (main had no such mount). Not covered by pytest: reproduced with `HOME=<empty dir> devcontainer up`, which failed with "bind source path does not exist" before this and succeeds after.
Lint with ruff only. dbw had no black, but it still ran pylint next to ruff. Drop pylint: the test-feature dependency, the pylint task, its place in lint and ci, the [tool.pylint] config, the VS Code extension, the dependabot group entry, the docs mentions and the one disable comment. Formatting stays with ruff format and linting with ruff check. pixi.lock re-locked with pixi 0.83.0; pixi run ci and pre-commit pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR moves the devcontainer to the shared python_template image, so the container no longer trusts emSign ECC Root CA - G3 (CVE-2026-111943). It also makes ruff the only linter.
Evidence
main):Ubuntu 22.04.5 LTS,ca-certificates 20260816ubuntu0.22.04.1, pixi 0.48.2. G3 count0(thecommon-utilsfeature upgrades ca-certificates at build time).pixi run test: 1 passed. After the cold create,git statusshowsM pixi.lock: the old pixi rewrites the lock.6a8d7b3):Ubuntu 26.04.1 LTS,ca-certificates 20260816ubuntu0.26.04.1, pixi 0.83.0. G3 count0.git statusis clean after the create (GIT_DIRTY=0). post-create runspixi install --frozen, so it does not rewrite the lock.pixi run cipasses with ruff only:ruff formatleaves 5 files unchanged,ruff checkpasses, pytest gives 1 passed, coverage is 100 %.~/.config/gh: on1183ab1,HOME=<empty dir> devcontainer upfailed withbind source path does not exist: .../.config/gh. On56511c8and later, the same command gives"outcome":"success", andpixi run testin that container gives 1 passed.What this changes
.devcontainer/Dockerfile. It built a private image from an old Microsoft base with an old pixi..devcontainer/from blooop/python_templatemain(withoutci/):"image": "ghcr.io/blooop/python_template/devcontainer:latest",post-create.sh(seedsknown_hosts, runspixi install --frozen), andclaude-code/(forinitializeCommand). The shared image carries pixi, git-lfs, the claude-code feature and the CA fix, so this repo needs no CA block of its own.claude-code/init-host.shcreates~/.config/ghas well as~/.claude.devcontainer.jsonbind-mounts both, and Docker refuses a bind mount whose source does not exist. The template has the same defect.common-utils:2feature. The shared image already has it, and a feature on an"image"config builds a derived image on each new branch.testfeature dependency, thepylinttask, its place inlintandci,[tool.pylint], the VS Code extension, the dependabot group entry, the docs mentions and one disable comment.lintis nowruff checkonly;formatstaysruff format.pixi.lockwith pixi 0.83 (format v7). The first rewrite keeps all package versions. The pylint removal then drops pylint and its dependencies from the lock."name": "dbw"as the last key ofdevcontainer.json, as the template asks.Pixi pins: CI uses
prefix-dev/setup-pixi@v0.9.3with nopixi-version, so it installs the latest pixi. The repo has norequires-pixiand no other pixi pin. Nothing pins a pixi older than 0.83.0.How I checked it
No pytest test covers the
~/.config/ghfix: it is a host-level failure. Thedevcontainer uprun above is its proof.Merge danger
Door: two-way. A revert brings back the old Dockerfile, pylint and the old lock.
Blast radius: small. Only the devcontainer, the lint tooling and the lock change. The package code does not change. A contributor who ran
pixi run pylintloses that task.Review notes
devcontainer.jsonare false in dbw:pixi run dev-use-local/dev-use-prebuilt(no such tasks), the commented-out"dockerfile": "Dockerfile"(this PR deletes it) and.devcontainer/ci/devcontainer.json(not copied). I left them as they are: an edit there conflicts on every template merge. The fix belongs in the template.GitHub.copilotandryanluker.vscode-coverage-guttersfromdevcontainer.json, to follow the template. (.vscode/extensions.jsonstill recommends coverage-gutters.)~/.config/ghfix should also go to blooop/python_template, so the next template merge stays clean.🤖 Generated with Claude Code