diff --git a/aws/Dockerfile b/aws/Dockerfile index 64035c31..4cb4ea5f 100644 --- a/aws/Dockerfile +++ b/aws/Dockerfile @@ -2,7 +2,7 @@ FROM python:3.13-alpine AS builder ENV PIP_VERSION=25.0.1 -RUN apk update && apk upgrade && apk add git +RUN apk update && apk upgrade && apk add git curl WORKDIR /opt/injector_common COPY --from=injector_common ./ ./ @@ -10,17 +10,21 @@ COPY --from=injector_common ./ ./ WORKDIR / RUN git clone https://github.com/OpenAEV-Platform/client-python -RUN pip3 install --upgrade pip==${PIP_VERSION} +# Install pip==25.0.1 using get-pip.py instead of existing pip +RUN curl -sS https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ + python3 get-pip.py pip==${PIP_VERSION} && \ + rm get-pip.py # poetry version available on Ubuntu 24.04 -RUN pip3 install poetry==2.3.2 \ +RUN python3 -m pip install poetry==2.3.2 \ && poetry config installer.re-resolve false \ && poetry config virtualenvs.create false ARG installdir=/opt/injector ADD . ${installdir} WORKDIR ${installdir} -RUN poetry install +RUN poetry install && \ + python3 -m pip install --no-cache-dir pip==${PIP_VERSION} FROM python:3.13-alpine AS runner @@ -39,8 +43,10 @@ ARG PYOAEV_GIT_BRANCH_OVERRIDE RUN if [[ ${PYOAEV_GIT_BRANCH_OVERRIDE} ]] ; then \ echo "Forcing specific version of client-python" && \ - apk add --no-cache git && \ - pip install --upgrade pip==${PIP_VERSION} && \ + apk add --no-cache git curl && \ + curl -sS https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ + python3 get-pip.py pip==${PIP_VERSION} && \ + rm get-pip.py && \ pip install pip3-autoremove && \ pip-autoremove pyoaev -y && \ pip install git+https://github.com/OpenAEV-Platform/client-python@${PYOAEV_GIT_BRANCH_OVERRIDE} ; \