Skip to content

Conversation

@idvoretskyi
Copy link
Owner

Switch Python setup to use OS precompiled binaries instead of compiling from source.

Changes:

  • Remove devcontainer Python feature (pyenv/source build path)
  • Install python3, python3-venv, python3-pip via apt in Dockerfile
  • Keep apt-get upgrade step as requested; extend hadolint ignore (DL3008, DL3009)
  • Update README to note OS-provided Python

Benefits:

  • Faster Codespaces/devcontainer spin-up
  • Simpler, more reproducible base image

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.

- 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 <[email protected]>
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 <[email protected]>
@idvoretskyi idvoretskyi requested a review from Copilot November 3, 2025 16:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 <[email protected]>
Signed-off-by: Ihor Dvoretskyi <[email protected]>
@idvoretskyi idvoretskyi merged commit d41ed06 into main Nov 3, 2025
7 checks passed
@idvoretskyi idvoretskyi deleted the prebuilt-python branch November 3, 2025 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants