From d0a1549467ead1866a1e0e90511e8f1be346b3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anthony=20Su=C3=A1rez?= Date: Sat, 1 Oct 2022 07:00:29 -0500 Subject: [PATCH] Install Docker packages with --no-cache-dir Pip has a "--no-cache-dir" argument to disable caching, eliminating the need of deleting the cache with a hard-coded path. --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5d797e03..22790dd0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,9 +19,8 @@ LABEL org.label-schema.vcs-ref=$VCS_REF \ COPY --from=build /wheels /wheels COPY . /opt/sherlock/ -RUN pip3 install -r requirements.txt -f /wheels \ - && rm -rf /wheels \ - && rm -rf /root/.cache/pip/* +RUN pip3 install --no-cache-dir -r requirements.txt -f /wheels \ + && rm -rf /wheels WORKDIR /opt/sherlock/sherlock