Questions about optimizing Dockerfile play (#1312)

* Don't cache dependencies in Dockerfile
bulk-clear-sessions
HuiFeng Tang 2020-04-12 03:50:06 +08:00 committed by GitHub
parent aeab4ded6e
commit 96f317293f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

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