Skip to content

AndCarrillo/docker-python-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐳 Docker Python Guide

Python 3.9+ Docker Flask FastAPI GitHub Actions License: MIT

Complete Docker guide for Python developers - Learn to containerize, develop, and deploy Python applications using Docker with hands-on examples.

🎯 What You'll Learn

Master Docker for Python development through practical, progressive modules:

  • 🐳 Containerize Python apps (Flask & FastAPI)
  • 🔧 Set up local development with Docker Compose
  • Implement code quality (linting, formatting, typing)
  • 🚀 Build CI/CD pipelines with GitHub Actions
  • ☸️ Deploy with Kubernetes locally

📚 Learning Path

Module Topic Level Branch
01 🐳 Containerization Beginner module-01-containerize
02 🔧 Development Setup Intermediate module-02-develop
03 ✨ Code Quality Intermediate module-03-linting-typing
04 🚀 CI/CD Pipeline Advanced module-04-cicd
05 ☸️ Deployment Advanced module-05-deployment

🏆 Final Project: project-complete - Complete implementation with all optimizations

🚀 Quick Start

Prerequisites

Get Started

# Clone the repository
git clone https://github.com/AndCarrillo/docker-python-guide.git
cd docker-python-guide

# Start with Module 1
git checkout module-01-containerize
# Follow the README instructions in that branch

📖 View complete workflow guide →

🛠️ Examples & Technologies

Frameworks

Framework Purpose Learning Focus
🧪 Flask Simple web framework Fundamentals, SQL databases, traditional patterns
FastAPI Modern async framework Performance, async/await, auto-documentation

Progressive Examples

  • 🧪 Flask + PostgreSQL - Traditional web app with relational database
  • ⚡ FastAPI + Redis - Modern API with caching and async operations
  • 🔧 Multi-stage builds - Optimized Docker images
  • 🚀 Complete CI/CD - Automated pipelines with GitHub Actions
  • ☸️ Kubernetes deployment - Local testing and deployment

📋 Module Overview

Create optimized Docker images for Python applications.

  • Dockerfiles and best practices
  • Security and non-root users
  • Multi-stage builds
  • Health checks

Set up local development environment.

  • Docker Compose for development
  • Hot reload and debugging
  • Environment variables and secrets
  • Database integration

Implement linting, formatting, and type checking.

  • Ruff for linting and formatting
  • mypy for type checking
  • Pre-commit hooks
  • VS Code integration

Automate builds with GitHub Actions.

  • Automated testing and building
  • Docker image publishing
  • Multi-environment deployment
  • Security scanning

Deploy and test with Kubernetes.

  • Local Kubernetes setup
  • Health checks and monitoring
  • Rolling updates and rollbacks
  • Debugging containerized apps

🎯 Key Features

  • Step-by-step tutorials with detailed explanations
  • Ready-to-use code in every example
  • Industry best practices and patterns
  • Hands-on exercises to reinforce learning
  • Troubleshooting guides for common issues

📚 Resources

🤝 Contributing

Contributions welcome! See Contributing Guide for:

  • Reporting issues
  • Submitting improvements
  • Code standards
  • Development workflow

📝 License

MIT License - see LICENSE for details.


📅 Last updated: July 2025
👨‍💻 Maintained by: Andrea Carrillo

About

No description or website provided.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages