Skip to content

Breaking change introduced in python:3.8-slim #944

Closed
@alecbw

Description

@alecbw

Hey all,

I have a series of Docker containers running python:3.8-slim that I deploy from my local machine to AWS ECS.

The last successful push was at July 22, 2024, 15:20:36, UTC.

I went to deploy one of the containers this morning - having made exactly 0 changes to the Dockerfile, the docker-compose.yml, the requirements.txt, or any other config file, and it failed out with the following message:

------                                                                                                          
 > [container-name 4/5] RUN pip install pip --upgrade     pip install -r requirements.txt:
#0 2.035 Requirement already satisfied: pip in /usr/local/lib/python3.8/site-packages (23.0.1)                  
#0 2.295 Collecting pip                                                                                         
#0 2.467   Downloading pip-24.1.2-py3-none-any.whl (1.8 MB)
#0 2.701      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 8.1 MB/s eta 0:00:00
#0 2.877 ERROR: Could not find a version that satisfies the requirement install (from versions: none)
#0 2.878 ERROR: No matching distribution found for install
#0 3.135 
#0 3.135 [notice] A new release of pip is available: 23.0.1 -> 24.1.2
#0 3.135 [notice] To update, run: pip install --upgrade pip
------
failed to solve: executor failed running [/bin/sh -c pip install pip --upgrade     pip install -r requirements.txt]: exit code: 1

Here's the entirety of my Dockerfile:

FROM python:3.8-slim

WORKDIR /app

ADD requirements.txt /app

RUN pip install pip --upgrade \
    pip install -r requirements.txt

ADD /folder /app

ARG AWS_ACCOUNT_ID
ENV AWS_ACCOUNT_ID=${AWS_ACCOUNT_ID}
ARG SENTRY_DSN
ENV SENTRY_DSN=${SENTRY_DSN}
ARG MODE
ENV MODE=${MODE}

CMD ["python", "main.py"]

I've tested with python:3.7-slim, and the problem does not replicate.

Removing the pip install pip --upgrade portion removes the error.

I noticed the last push to for python:3.8-slim was an hour ago. The last change to pip was 20 hours ago, before the last successful push I had.

Thoughts?

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