From 6abbd56df3f6f661999928def2fb61bd4fc6f786 Mon Sep 17 00:00:00 2001 From: FireMasterk <20838718+FireMasterK@users.noreply.github.com> Date: Wed, 9 Sep 2020 14:31:33 +0530 Subject: [PATCH] Reduce docker image size. --- Dockerfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6b36e67..5f8971d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,14 +2,12 @@ FROM python:3-alpine WORKDIR /usr/src/app -RUN apk --no-cache add gcc musl-dev libffi-dev openssl-dev libxml2-dev libxslt-dev file llvm-dev make g++ - COPY requirements.txt ./ -RUN pip install --no-cache-dir wheel cryptography gunicorn pymysql -RUN pip install --no-cache-dir -r requirements.txt - -RUN apk del gcc musl-dev libffi-dev openssl-dev file llvm-dev make g++ +RUN apk --no-cache add gcc musl-dev libffi-dev openssl-dev libxml2-dev libxslt-dev file llvm-dev make g++ \ + && pip install --no-cache-dir wheel cryptography gunicorn pymysql \ + && pip install --no-cache-dir -r requirements.txt \ + && apk del gcc musl-dev libffi-dev openssl-dev file llvm-dev make g++ COPY . .