Install requirements first and then copy the code to make good use of

docker cache.
This commit is contained in:
Nicolas CARPi 2020-01-23 19:46:22 +01:00
parent 55f54497f2
commit 4b191506ed
1 changed files with 4 additions and 3 deletions

View File

@ -2,12 +2,13 @@ FROM python:3.7
WORKDIR /code
# copy everything into /code
COPY . .
# install dependencies
COPY ./requirements.txt ./
RUN pip3 install --no-cache-dir -r requirements.txt
# copy everything else into /code
COPY . .
EXPOSE 7777
#gunicorn wsgi:app -b 0.0.0.0:7777 -w 2 --timeout 15 --log-level DEBUG