Using Docker’s multi-stage build feature and Python’s virtualenv tool, we can make smaller and more secure docker images for production.
https://pmac.io/2019/02/multi-stage-dockerfile-and-python-virtualenv/