Reduce docker image size.

This commit is contained in:
FireMasterk 2020-09-09 14:31:33 +05:30
parent becd9df30d
commit 6abbd56df3

View File

@ -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 . .