project-pegaprox icon indicating copy to clipboard operation
project-pegaprox copied to clipboard

Dockerfile uses unpinned latest tag and unspecified Python version

Open cinpol opened this issue 10 months ago • 1 comments

The current Dockerfile has two best practice violations that could lead to unpredictable builds and potential breakage:

  • Using alpine:latest instead of a pinned version
  • No explicit Python version specified despite requiring Python 3.8+

Unpinned Alpine version

Using latest creates several issues:

  • Non-reproducible builds - different developers/CI runs may get different base images
  • Unpredictable breaking changes - new Alpine releases could introduce incompatibilities
  • Harder debugging - difficult to determine which Alpine version caused an issue
  • Security concerns - harder to track and audit what's actually running in production

Unspecified Python version

While the project requires Python 3.8+, the Dockerfile installs whatever python3 package comes with the Alpine version, which:

  • Could theoretically be below 3.8 with very old Alpine versions
  • Makes the Python version implicit and dependent on the Alpine version
  • Lacks clarity for developers about which Python version is actually used

Solution

Pin both the Alpine version and ensure a specific Python version: FROM alpine:3.19 (or any other tag that support Python 3.8+)

Or use a Python-specific base image for even more clarity: FROM python:3.11-alpine3.19

Happy to submit a PR if needed!

cinpol avatar Feb 02 '26 19:02 cinpol

Hi @cinpol ,

Thank you for noticing. Feel free to submit here a PR.

Regards, Marcus

mkellermann97 avatar Feb 03 '26 05:02 mkellermann97