From 5e1dd0c0b5cd0a4625ff63d055838a30249aa61a Mon Sep 17 00:00:00 2001 From: Carina Antunes <carina.oliveira.antunes@cern.ch> Date: Mon, 26 Sep 2022 20:14:35 +0200 Subject: [PATCH] Fix poetry install - use recommended install method --- Dockerfile | 9 +-------- Dockerfile-base | 8 ++++++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9e5a8c2..6799436 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,10 @@ -FROM gitlab-registry.cern.ch/push-notifications/notifications-consumer/notifications-consumer-base:1a33f01a +FROM gitlab-registry.cern.ch/push-notifications/notifications-consumer/notifications-consumer-base:5274dfde # FROM notifications-consumer-base:latest ARG build_env WORKDIR /opt/ COPY ./ ./ -# pip --upgrade because of cryptography module issues with poetry. -RUN python -V && \ - pip -V && \ - pip install --upgrade pip && \ - pip install poetry && \ - poetry config virtualenvs.create false - RUN if [ "$build_env" == "development" ]; \ then poetry install; \ else poetry install --no-dev; \ diff --git a/Dockerfile-base b/Dockerfile-base index bfebd3a..1fa5f22 100644 --- a/Dockerfile-base +++ b/Dockerfile-base @@ -14,8 +14,12 @@ RUN dnf install -y gcc \ dnf clean all # Symlink python -RUN ln -nsf /usr/bin/python3.9 /usr/bin/python && ln -nsf /usr/bin/pip3.9 /usr/bin/pip && \ - ln -nsf /usr/bin/python3.9 /usr/bin/python3 && ln -nsf /usr/bin/pip3.9 /usr/bin/pip3 +RUN ln -nsf /usr/bin/python3.9 /usr/bin/python && ln -nsf /usr/bin/python3.9 /usr/bin/python3 + +RUN curl -sSL https://install.python-poetry.org | python3 - +ENV PATH="${PATH}:/root/.local/bin" + +RUN poetry --version && poetry config virtualenvs.create false -vvv ENV LANG en_US.utf8 ENV LC_ALL en_US.utf8 -- GitLab