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.
This commit is contained in:
Anthony Suárez 2022-10-01 07:00:29 -05:00
parent 0f62137b49
commit d0a1549467
1 changed files with 2 additions and 3 deletions

View File

@ -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