Skip to content

SSL problems on python:3.11.8-bookworm image? #906

@babinos87

Description

@babinos87

I decided to upgrade an image of mine to Python 3.11, and I thought to use the bookworm version (I've used bullseye so far).

This is the image I try: https://hub.docker.com/layers/library/python/3.11.8-bookworm/images/sha256-72afb375030b13c8c9cb72ba1d8c410f25307c2dbbd7d59f9c6ccea5cb152ff9?context=explore

I can build the image for amd64 architecture (no errors), but on arm64 I get SSL errors for bookworm, like (truncated snippet):

#18 [linux/arm64 4/9] RUN . /usr/src/app/.virtualenvs/webEnv311/bin/activate     && pip3 install --no-cache-dir -r /tmp/requirements.txt --trusted-host https://my-pypi.domain.io     && rm -f /tmp/requirements.txt

#18 [linux/arm64 4/9] RUN <log removed I just install requiremements>

#18 16.08 WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
#18 16.91 WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /packages/
#18 17.42 WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /packages/
#18 18.42 WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /packages/
#18 20.43 WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /packages/
#18 24.44 WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /packages/
...
#18 32.01 Could not fetch URL https://pypi.org/simple/arrow/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/arrow/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
#18 32.09 ERROR: Could not find a version that satisfies the requirement arrow<2.0.0,>=1.3.0 (from versions: none)
#18 32.10 ERROR: No matching distribution found for arrow<2.0.0,>=1.3.0
#18 32.17 WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

I was able to reproduce this locally. And I can confirm that when building 3.11.8-bullseye, everything works fine on both amd64 and arm64 architectures (builds succeed without those errors).

Is there some problem with the Python 3.11.8 on the bookworm image when building for arm64 (did not check other versions apart from amd64 which works).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions