From 96f317293fdb737c0e2d973d7d032e475c2a3947 Mon Sep 17 00:00:00 2001 From: HuiFeng Tang <45918704+99Kies@users.noreply.github.com> Date: Sun, 12 Apr 2020 03:50:06 +0800 Subject: [PATCH] Questions about optimizing Dockerfile play (#1312) * Don't cache dependencies in Dockerfile --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8224654..0d0553f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ WORKDIR /opt/CTFd RUN mkdir -p /opt/CTFd /var/log/CTFd /var/uploads RUN apk update && \ - apk add \ + apk add --no-cache \ python \ python-dev \ linux-headers \ @@ -18,10 +18,10 @@ RUN apk update && \ COPY . /opt/CTFd -RUN pip install -r requirements.txt +RUN pip install -r requirements.txt --no-cache-dir RUN for d in CTFd/plugins/*; do \ if [ -f "$d/requirements.txt" ]; then \ - pip install -r $d/requirements.txt; \ + pip install -r $d/requirements.txt --no-cache-dir; \ fi; \ done;