Skip to content

Pin Dockerfile base image to python:3.12-slim - #79

Open
mateofumis wants to merge 1 commit into
OWASP:mainfrom
mateofumis:fix/pin-python-version-dockerfile
Open

mateofumis wants to merge 1 commit into
OWASP:mainfrom
mateofumis:fix/pin-python-version-dockerfile

Conversation

@mateofumis

Copy link
Copy Markdown

This PR closes #78

Description

The current Dockerfile uses the floating (unpinned) python:3-slim base image.

When it is built in newer environments it will fail since python:3-slim automatically tracks the latest Python release, and no matching pre-compiled binary wheel exists on PyPI for this specific version combination. The build then crashes immediately because the minimal slim base image lacks the necessary compiler toolchain (gcc).

Pinning the base image to python:3.12-slim fixes this by ensuring compatibility with the existing pre-compiled binaries.

@bernhste bernhste left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I just had the same issue when building the devcontainer.

Pinning the version to 3.12 works.

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.

[Bug] Pin Dockerfile base image to python:3.12-slim version to Fix pandas build failure

2 participants