From bb5b0b99bdbd2f74df8d5cae6345b0a82dccc428 Mon Sep 17 00:00:00 2001 From: Frank Agerholm Date: Tue, 11 Jul 2023 16:01:47 +0000 Subject: [PATCH] Remove pip cache --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1d7a298..15ba77e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,11 @@ FROM docker.io/library/python:3.11-alpine RUN apk --no-cache add sshpass openssh-client lftp; mkdir -p /opt/app -ADD requirements.txt /opt/app/ +WORKDIR /opt/app +ADD requirements.txt /root/ +ADD Dockerfile /root/ # ignore "Running pip as root" warning ENV PIP_ROOT_USER_ACTION=ignore -RUN pip install -r /opt/app/requirements.txt && pip freeze +RUN pip install -r /root/requirements.txt && pip freeze && rm -Rf "$(pip cache dir)"