Improve Dockerfile Size

This commit is contained in:
Narbeh Arakil 2021-01-06 12:07:28 +03:30
parent 94c9a42b72
commit f8a58df60c

View File

@ -1,9 +1,12 @@
FROM python:3
WORKDIR /usr/src/app
FROM python:3.8-slim
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY requirements.txt /
RUN apt-get update \
&& apt-get install -y --no-install-recommends gcc \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --no-cache-dir -r /requirements.txt \
&& apt-get purge -y --auto-remove gcc
COPY . .
ENTRYPOINT ["python", "./ssl_checker.py"]
ENTRYPOINT ["python", "/ssl_checker.py"]