chore: FIx devcontainer python install issue - #284
Open
Alon Yeshurun (ayeshurun) wants to merge 2 commits into
Open
chore: FIx devcontainer python install issue#284Alon Yeshurun (ayeshurun) wants to merge 2 commits into
Alon Yeshurun (ayeshurun) wants to merge 2 commits into
Conversation
Copilot started reviewing on behalf of
Alon Yeshurun (ayeshurun)
September 3, 2026 10:58
View session
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The post-create script’s pip install is likely to fail under the default non-root devcontainer user unless it installs to user/venv or uses elevation, undermining the PR’s reliability goal.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the repository’s devcontainer setup to make dependency installation more reliable by switching to a custom Dockerfile (Debian bookworm) and simplifying the post-create setup script, including an optional PIP_INDEX_URL override via a git-ignored local env file.
Changes:
- Switch
.devcontainer/devcontainer.jsonto build from a repo-local Dockerfile and remove the Node feature (sincechangieis installed in the image). - Add
.devcontainer/local.env.exampleand ignore.devcontainer/local.envto support private pip index overrides without committing secrets. - Harden
scripts/install_dev_container_dependencies.sh(strict bash flags, repo-root-relative paths) and reduce it to pip requirements installation.
File summaries
| File | Description |
|---|---|
scripts/install_dev_container_dependencies.sh |
Uses strict bash mode, resolves repo root, optionally reads PIP_INDEX_URL, and installs Python dev/docs requirements. |
.gitignore |
Ignores .devcontainer/local.env and devcontainer-lock.json to prevent accidental commits. |
.devcontainer/local.env.example |
Documents how to configure an optional PIP_INDEX_URL override for restricted networks. |
.devcontainer/Dockerfile |
Installs build deps and installs changie via a verified .deb with SHA256 validation. |
.devcontainer/devcontainer.json |
Moves from a fixed image reference to building the custom Dockerfile; removes the Node feature. |
Review details
- Files reviewed: 4/5 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
📥 Pull Request
The devcontainer previously relied on the base image's Python setup plus a separate npm-based
changieinstall, which was failing dependency installation. This switches to a custom Dockerfile (pinned Python 3.12-bookworm) that installs build deps andchangievia a verified.debpackage instead of npm, removes the now-unneeded Node feature, and hardensinstall_dev_container_dependencies.sh(set -euo pipefail, absolute paths, optionalPIP_INDEX_URLoverride via a git-ignoredlocal.env) so dev container setup is reliable across environments, including restricted-network mirrors.Changes
.devcontainer/devcontainer.json: Switched from a fixed baseimagetobuild.dockerfile, and removed thenodefeature (no longer needed sincechangieis installed via the Dockerfile)..devcontainer/local.env.example(new): Documents an optionalPIP_INDEX_URLoverride for use with internal pip mirrors; copy to.devcontainer/local.env(git-ignored) to use.scripts/install_dev_container_dependencies.sh: Made executable; addedset -euo pipefail; resolves paths relative to the repo root; sourcesPIP_INDEX_URLfrom.devcontainer/local.envif present; installs pip requirements only (apt packages andchangiemoved into the Dockerfile).python:1-3.12-bullseye(legacy tag format, Debian 11) topython:3-3.12-bookworm(current tag format, Debian 12), needed for a valid, maintained base to build the custom Dockerfile from.