From 21f5f40b9bbebc6b7809091cac4279244399bcd3 Mon Sep 17 00:00:00 2001 From: guillaumedsde <30023543+guillaumedsde@users.noreply.github.com> Date: Thu, 21 Sep 2023 21:31:23 +0200 Subject: [PATCH] fix: Dockerfile cache directories --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0452d22..9d88743 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,20 +7,20 @@ WORKDIR /app # NOTE: we use a special cache mount for the pip cache # hadolint ignore=DL3042 -RUN --mount=type=cache,target=/home/nonroot/.cache,id=pip-cache-poetry-install \ +RUN --mount=type=cache,target=~/.cache,id=pip-cache-poetry-install \ pip install "poetry==1.4.2" COPY --chown=nonroot:nonroot pyproject.toml poetry.* ./ # NOTE: add poetry to path -ARG PATH="$PATH:/home/nonroot/.local/bin" +ARG PATH="$PATH:~/.local/bin" ARG POETRY_NO_INTERACTION=true ARG POETRY_VIRTUALENVS_OPTIONS_NO_SETUPTOOLS=true ARG POETRY_VIRTUALENVS_OPTIONS_NO_PIP=true ARG POETRY_VIRTUALENVS_OPTIONS_ALWAYS_COPY=true # FIXME: figure out why cache is not working -RUN --mount=type=cache,target=/home/nonroot/.cache,id=poetry-install \ +RUN --mount=type=cache,target=~/.cache,id=poetry-install \ poetry install --sync --no-root --only main \ && rm -rf .venv/pyvenv.cfg .venv/src .venv/.gitignore