Speed up docker builds (#1767)

* Copy over `requirements.txt` first in Dockerfile to cache Python dependencies
This commit is contained in:
Ace Pace
2021-01-14 22:16:56 +02:00
committed by GitHub
parent e1991e1696
commit ac04d9049b

View File

@@ -14,9 +14,12 @@ RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY . /opt/CTFd
COPY requirements.txt /opt/CTFd/
RUN pip install -r requirements.txt --no-cache-dir
COPY . /opt/CTFd
# hadolint ignore=SC2086
RUN for d in CTFd/plugins/*; do \
if [ -f "$d/requirements.txt" ]; then \