Skip to content

fix(docker): Define python/python3 alias for every image#11225

Merged
ovr merged 1 commit into
masterfrom
fix/python-alias
Jul 21, 2026
Merged

fix(docker): Define python/python3 alias for every image#11225
ovr merged 1 commit into
masterfrom
fix/python-alias

Conversation

@ovr

@ovr ovr commented Jul 8, 2026

Copy link
Copy Markdown
Member

No description provided.

@ovr
ovr requested a review from a team as a code owner July 8, 2026 17:05
@claude

claude Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Claude finished @ovr's task in 39s —— View job


Code Review

Verdict: LGTM — 0 high, 0 medium, 1 low.

Review details
  • Read PR diff
  • Analyze changes
  • Post review

Summary

Replaces the Debian python3 metapackage with an explicit python3.13 install across all Dockerfiles, and uses update-alternatives to register both /usr/bin/python3 and /usr/bin/python aliases pointing at python3.13. This makes the python command available (needed by node-gyp on some paths) and pins the exact interpreter version rather than relying on Debian's default. The same three-line pattern is applied consistently in every build/final stage.

Observations

  • Applied consistently to all 5 Dockerfiles and both the build and final stages where relevant — nice.
  • Removing the python3 metapackage is fine: python3.13 provides the interpreter, and update-alternatives re-establishes the /usr/bin/python3 symlink previously provided by the metapackage. No packages in these images depend on the metapackage.
  • packages/cubejs-docker/testing-drivers.Dockerfile line 16 — the build stage now installs python3.13 but not libpython3.13-dev, while the final stage does. This matches the prior behavior (build stage didn't install a -dev package either), so it's not a regression, just noting for consistency with the other Dockerfiles which pair them together in the build stage.

Low

  • Priority 1 in update-alternatives --install ... 1 is very low. If any future package registers a higher-priority alternative for python3, it would silently take over. Not a bug today, but bumping to a higher value (e.g. 100, which matches Debian's own convention for python3.x alternatives) would make the intent stickier. Applies to all five Dockerfiles.

Nits

  • In latest-debian-jdk.Dockerfile and latest.Dockerfile, the comment # libpython3-dev is needed to trigger post-installer to download native with python is now the sole leftover from the removed comment pair — reads a little oddly on its own but is still accurate.
    • Branch: fix/python-alias

@ovr
ovr merged commit 61662c8 into master Jul 21, 2026
48 checks passed
@ovr
ovr deleted the fix/python-alias branch July 21, 2026 11:44
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