Use precompiled Python via apt (faster spin-up)#11
Merged
idvoretskyi merged 3 commits intomainfrom Nov 3, 2025
Merged
Conversation
- Remove devcontainer Python feature (pyenv/source build) - Install python3, python3-venv, python3-pip via apt in Dockerfile - Remove apt-get upgrade to keep builds fast and pass hadolint - Update README to note OS-provided Python Speeds up Codespaces spin-up by avoiding compilation. Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
Re-add apt-get -y upgrade --no-install-recommends after update per request. Also expand hadolint ignore to DL3008,DL3009 to avoid false-positive lints. Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR optimizes the devcontainer setup by switching from a feature-installed Python to OS-provided Python packages, reducing build time while maintaining functionality.
Key changes:
- Removed the Python devcontainer feature (version 3.12) from devcontainer.json
- Added python3, python3-venv, and python3-pip as apt packages in the Dockerfile
- Updated documentation to reflect the use of OS-provided Python for faster setup
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| README.md | Added documentation note about using OS-provided Python for faster setup |
| .devcontainer/devcontainer.json | Removed the Python devcontainer feature configuration |
| .devcontainer/Dockerfile | Added python3 packages via apt-get and updated hadolint ignore directive |
Comments suppressed due to low confidence (1)
README.md:12
- The documentation states Python 3.12, but after removing the devcontainer feature, the version is now determined by Ubuntu 24.04's default Python version (likely 3.12.x, but not guaranteed to be 3.12). Consider updating to 'Python 3 (Ubuntu default) with pip' or verify and document the specific version provided by Ubuntu 24.04.
- Python 3.12 with pip
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
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.
Switch Python setup to use OS precompiled binaries instead of compiling from source.
Changes:
Benefits:
Note on Node.js: The devcontainer Node feature (ghcr.io/devcontainers/features/node:1 with version "lts") uses prebuilt binaries from upstream and does not compile from source, so no change is needed for Node at this time.