Added --no-cache-dir
option to all Python pip commands in Dockerfiles (#113)
The cache gives no benefit to a Docker image but it does add size, hence it's best left out. Signed-off-by: Andy Madge <andymadge@gmail.com>
This commit is contained in:
parent
a2cf9cc9f3
commit
a42a8531ab
@ -2,7 +2,7 @@ FROM python:3.7-alpine
|
|||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY requirements.txt /app
|
COPY requirements.txt /app
|
||||||
RUN pip3 install -r requirements.txt
|
RUN pip3 install -r requirements.txt --no-cache-dir
|
||||||
COPY . /app
|
COPY . /app
|
||||||
ENTRYPOINT ["python3"]
|
ENTRYPOINT ["python3"]
|
||||||
CMD ["manage.py", "runserver", "0.0.0.0:8000"]
|
CMD ["manage.py", "runserver", "0.0.0.0:8000"]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM python:3.7-alpine
|
FROM python:3.7-alpine
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY requirements.txt /app
|
COPY requirements.txt /app
|
||||||
RUN pip3 install -r requirements.txt
|
RUN pip3 install -r requirements.txt --no-cache-dir
|
||||||
COPY . /app
|
COPY . /app
|
||||||
ENTRYPOINT ["python3"]
|
ENTRYPOINT ["python3"]
|
||||||
CMD ["app.py"]
|
CMD ["app.py"]
|
||||||
|
@ -2,6 +2,6 @@ FROM python:3.7
|
|||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt --no-cache-dir
|
||||||
|
|
||||||
CMD ["./server.py"]
|
CMD ["./server.py"]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM python:3.8-alpine
|
FROM python:3.8-alpine
|
||||||
WORKDIR /code
|
WORKDIR /code
|
||||||
COPY requirements.txt /code/
|
COPY requirements.txt /code/
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt --no-cache-dir
|
||||||
COPY . /code/
|
COPY . /code/
|
||||||
ENV FLASK_APP hello.py
|
ENV FLASK_APP hello.py
|
||||||
CMD flask run --host=0.0.0.0
|
CMD flask run --host=0.0.0.0
|
||||||
|
Loading…
Reference in New Issue
Block a user