From aba8284268ccf68be9ac1163ca8d479292059052 Mon Sep 17 00:00:00 2001 From: Sarah Mount Date: Thu, 22 Aug 2024 13:39:55 +0100 Subject: [PATCH] Install poetry more defensively Avoid errors when building the Dockerfile by: * Creating directories and files that 'poetry install' expects * Adding poetry to the current $PATH --- docker/web/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/web/Dockerfile b/docker/web/Dockerfile index b609557f..e8a88c1a 100644 --- a/docker/web/Dockerfile +++ b/docker/web/Dockerfile @@ -127,8 +127,10 @@ COPY ./app/pyproject.toml /usr/srv/app/pyproject.toml COPY ./app/poetry.lock /usr/srv/app/poetry.lock ## self update disabled currently due to causing timeout issues in the deploy #RUN $HOME/.local/bin/poetry self update 1.2.2 && \ -RUN $HOME/.local/bin/poetry install - +RUN mkdir -p $HOME/.poetry \ + && touch $HOME/.poetry/env \ + && $HOME/.local/bin/poetry install \ + && ln -s $HOME/.local/bin/poetry /usr/local/bin/poetry VOLUME /usr/srv/app/media