mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-19 06:54:20 +01:00
Questions about optimizing Dockerfile play (#1312)
* Don't cache dependencies in Dockerfile
This commit is contained in:
@@ -3,7 +3,7 @@ WORKDIR /opt/CTFd
|
|||||||
RUN mkdir -p /opt/CTFd /var/log/CTFd /var/uploads
|
RUN mkdir -p /opt/CTFd /var/log/CTFd /var/uploads
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk add \
|
apk add --no-cache \
|
||||||
python \
|
python \
|
||||||
python-dev \
|
python-dev \
|
||||||
linux-headers \
|
linux-headers \
|
||||||
@@ -18,10 +18,10 @@ RUN apk update && \
|
|||||||
|
|
||||||
COPY . /opt/CTFd
|
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 \
|
RUN for d in CTFd/plugins/*; do \
|
||||||
if [ -f "$d/requirements.txt" ]; then \
|
if [ -f "$d/requirements.txt" ]; then \
|
||||||
pip install -r $d/requirements.txt; \
|
pip install -r $d/requirements.txt --no-cache-dir; \
|
||||||
fi; \
|
fi; \
|
||||||
done;
|
done;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user