How to Write Dockerfiles for Python Web Apps
This guide provides examples for writing Dockerfiles for Python web apps. It covers using appropriate base images (debian for dev, alpine for production), hot reloading during development with gunicorn, optimizing cache layers, serving static files, and multi-stage production builds to reduce final image size. The tutorial also includes a simple directory structure, Dockerfile examples, .dockerignore file, hot reloading with Gunicorn, running single python scripts, serving static files, single stage production build, and multi-stage production build.
Company
Hasura
Date published
Feb. 26, 2018
Author(s)
Praveen Durairaju
Word count
979
Hacker News points
None found.
Language
English