How to Write Dockerfiles for Python Web Apps

TL;DR This post is filled with examples ranging from a simple Dockerfile to multistage production builds for Python apps. Here’s a quick summary of what this guide covers: Using an appropriate base image (debian for dev, alpine for production). Using gunicorn for hot reloading during development. Optimising for Docker cache layers — placing commands in the right order so that pip install is…

This is an excerpt. The full article continues at Hasura.