'How can we improve improve docker image size [duplicate]
Can any one help me understand how can we
Try to optimize the Dockerfile by removing all unnecessary cache/files to reduce the image size. and
Removing unnecessary binaries/permissions to improve container security
My docker file look like this
FROM python:3.7-alpine
WORKDIR /code
ENV FLASK_APP app.py
ENV FLASK_RUN_HOST 0.0.0.0
RUN apk add --no-cache gcc musl-dev linux-headers
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY . .
CMD ["flask", "run"]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
