From d764a0458bfdff526f844604ede7ba6b49e73e08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 17 Sep 2021 16:49:07 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Add=20pip=20flag=20--no-ca?= =?UTF-8?q?che-dir=20to=20reduce=20disk=20size=20used=20(#38)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-images/python2.7.dockerfile | 2 +- docker-images/python3.6-alpine3.8.dockerfile | 2 +- docker-images/python3.6.dockerfile | 2 +- docker-images/python3.7-alpine3.8.dockerfile | 2 +- docker-images/python3.7.dockerfile | 2 +- docker-images/python3.8-alpine3.11.dockerfile | 2 +- docker-images/python3.8.dockerfile | 2 +- docker-images/python3.9-alpine3.13.dockerfile | 2 +- docker-images/python3.9.dockerfile | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docker-images/python2.7.dockerfile b/docker-images/python2.7.dockerfile index fe55a09..ca10bb2 100644 --- a/docker-images/python2.7.dockerfile +++ b/docker-images/python2.7.dockerfile @@ -6,7 +6,7 @@ LABEL maintainer="Sebastian Ramirez " # Newer versions don't support Python 2.7 (Python 2.7 reached end of life long ago) # So for this tag just install whatever is available for Python 2.7, don't use # Dependabot's updated requirements -RUN pip install meinheld gunicorn +RUN pip install --no-cache-dir meinheld gunicorn COPY ./entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh diff --git a/docker-images/python3.6-alpine3.8.dockerfile b/docker-images/python3.6-alpine3.8.dockerfile index d181c99..983ea2a 100644 --- a/docker-images/python3.6-alpine3.8.dockerfile +++ b/docker-images/python3.6-alpine3.8.dockerfile @@ -5,7 +5,7 @@ LABEL maintainer="Sebastian Ramirez " COPY requirements.txt /tmp/requirements.txt RUN apk add --no-cache --virtual .build-deps gcc libc-dev \ - && pip install -r /tmp/requirements.txt \ + && pip install --no-cache-dir -r /tmp/requirements.txt \ && apk del .build-deps gcc libc-dev COPY ./entrypoint.sh /entrypoint.sh diff --git a/docker-images/python3.6.dockerfile b/docker-images/python3.6.dockerfile index fb176ef..7774adc 100644 --- a/docker-images/python3.6.dockerfile +++ b/docker-images/python3.6.dockerfile @@ -3,7 +3,7 @@ FROM python:3.6 LABEL maintainer="Sebastian Ramirez " COPY requirements.txt /tmp/requirements.txt -RUN pip install -r /tmp/requirements.txt +RUN pip install --no-cache-dir -r /tmp/requirements.txt COPY ./entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh diff --git a/docker-images/python3.7-alpine3.8.dockerfile b/docker-images/python3.7-alpine3.8.dockerfile index 14b41d8..127de0a 100644 --- a/docker-images/python3.7-alpine3.8.dockerfile +++ b/docker-images/python3.7-alpine3.8.dockerfile @@ -5,7 +5,7 @@ LABEL maintainer="Sebastian Ramirez " COPY requirements.txt /tmp/requirements.txt RUN apk add --no-cache --virtual .build-deps gcc libc-dev \ - && pip install -r /tmp/requirements.txt \ + && pip install --no-cache-dir -r /tmp/requirements.txt \ && apk del .build-deps gcc libc-dev COPY ./entrypoint.sh /entrypoint.sh diff --git a/docker-images/python3.7.dockerfile b/docker-images/python3.7.dockerfile index dff19ca..26a19be 100644 --- a/docker-images/python3.7.dockerfile +++ b/docker-images/python3.7.dockerfile @@ -3,7 +3,7 @@ FROM python:3.7 LABEL maintainer="Sebastian Ramirez " COPY requirements.txt /tmp/requirements.txt -RUN pip install -r /tmp/requirements.txt +RUN pip install --no-cache-dir -r /tmp/requirements.txt COPY ./entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh diff --git a/docker-images/python3.8-alpine3.11.dockerfile b/docker-images/python3.8-alpine3.11.dockerfile index ba1d134..5bd40a2 100644 --- a/docker-images/python3.8-alpine3.11.dockerfile +++ b/docker-images/python3.8-alpine3.11.dockerfile @@ -5,7 +5,7 @@ LABEL maintainer="Sebastian Ramirez " COPY requirements.txt /tmp/requirements.txt RUN apk add --no-cache --virtual .build-deps gcc libc-dev \ - && pip install -r /tmp/requirements.txt \ + && pip install --no-cache-dir -r /tmp/requirements.txt \ && apk del .build-deps gcc libc-dev COPY ./entrypoint.sh /entrypoint.sh diff --git a/docker-images/python3.8.dockerfile b/docker-images/python3.8.dockerfile index 1e8d3d4..bf27d9d 100644 --- a/docker-images/python3.8.dockerfile +++ b/docker-images/python3.8.dockerfile @@ -3,7 +3,7 @@ FROM python:3.8 LABEL maintainer="Sebastian Ramirez " COPY requirements.txt /tmp/requirements.txt -RUN pip install -r /tmp/requirements.txt +RUN pip install --no-cache-dir -r /tmp/requirements.txt COPY ./entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh diff --git a/docker-images/python3.9-alpine3.13.dockerfile b/docker-images/python3.9-alpine3.13.dockerfile index 8855b2c..d33a603 100644 --- a/docker-images/python3.9-alpine3.13.dockerfile +++ b/docker-images/python3.9-alpine3.13.dockerfile @@ -5,7 +5,7 @@ LABEL maintainer="Sebastian Ramirez " COPY requirements.txt /tmp/requirements.txt RUN apk add --no-cache --virtual .build-deps gcc libc-dev \ - && pip install -r /tmp/requirements.txt \ + && pip install --no-cache-dir -r /tmp/requirements.txt \ && apk del .build-deps gcc libc-dev COPY ./entrypoint.sh /entrypoint.sh diff --git a/docker-images/python3.9.dockerfile b/docker-images/python3.9.dockerfile index bc0dd1d..1d365f6 100644 --- a/docker-images/python3.9.dockerfile +++ b/docker-images/python3.9.dockerfile @@ -3,7 +3,7 @@ FROM python:3.9 LABEL maintainer="Sebastian Ramirez " COPY requirements.txt /tmp/requirements.txt -RUN pip install -r /tmp/requirements.txt +RUN pip install --no-cache-dir -r /tmp/requirements.txt COPY ./entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh