How to Create a Great Local Python Development Environment with Docker
summary
Step-by-step recipe for a reproducible local Python setup using Docker: build a container from a Python 3.10 slim base, install Fast API and uvicorn in the image, map code with volumes so live edits appear immediately, run in detached mode with port 80 exposed, add Redis (6379) via Docker compose by declaring an image and a depends_on, open VS Code attach to running container to get IDE completions, and enable remote debugging with debugpy listening on 5678.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:56Why use Docker
- 3:56Dockerizing a Python app
- 6:54Building and running
- 10:21Using Docker volumes
- 13:35IDE integration
- 17:33Docker compose basics
- 20:58Adding a database
- 25:49Debugging in Docker
related talks
34mModern development environments for Pythonistas
36mHow to create a Devcontainer for your Python project 🐳
26mHow to containerize Python applications with Docker
23mCleaning Up Your Python Environment Superfund Site
09mShareable Working Environments
29mBest Practices for Compose-managed Python Apps
34mDockerizing Django
02h 28mWorkshop: Learn How to Dockerize Your Python Application
