Open uniquejava opened 4 years ago
https://pythonspeed.com/articles/smaller-python-docker-images/
# # docker build --rm -t awesome . # docker run --name awesome1 --link=db2inst1:db2inst1 -p 3000:3000 -dt awesome # FROM python:3.7-slim RUN apt-get update && \ apt-get install -y gcc libxml2 && \ apt-get clean WORKDIR /app # We copy just the requirements.txt first to leverage Docker cache COPY server/requirements.txt /app RUN pip install -r requirements.txt COPY server /app ENV PORT 3000 EXPOSE 3000 USER root CMD python server.py
https://pythonspeed.com/articles/smaller-python-docker-images/