Install dependencies before installing from pypi for better layer caching

This commit is contained in:
Markus Pöschl 2021-05-15 11:06:17 +02:00
parent cec2c453bc
commit 4794c2b6ab
1 changed files with 5 additions and 1 deletions

View File

@ -19,7 +19,11 @@ RUN apt-get update && \
FROM build as remoteInstall
# Force rebuild otherwise it could be cached without rerun
# Install the dependencies beforehand to make them cacheable
COPY requirements.txt .
RUN pip3 install --no-cache-dir --user -r requirements.txt
# Force install otherwise it could be cached without rerun
ARG CHANGING_ARG
RUN pip3 install --no-cache-dir --user glances[all]