diff --git a/Dockerfile b/Dockerfile index 9e5a8c2de07af4c2fde4abdcc4b72ae85a26d0e4..679943630e57bb9db92c054dd7547e5e3fb8c7e3 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 bfebd3a9155c5a916fdf3967463807ab0cd4fc21..1fa5f2228e80b47eed5b3e08c5218f21ffd2762c 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