Docker Best Practices

Docker containerization patterns for Python/React projects. Use when creating or modifying Dockerfiles, optimizing image size, setting up Docker Compose for local development, or hardening container security. Covers multi-stage builds for Python (python:3.12-slim) and React (node:20-alpine -> nginx:alpine), layer optimization, .dockerignore, non-root user, security scanning with Trivy, Docker Compose for dev (backend + frontend + PostgreSQL + Redis), and image tagging strategy. Does NOT cover deployment orchestration (use deployment-pipeline).

hieutrtr 671d9b6 4 files · 27.4 KB Updated

File contents

hieutrtr/ai1-skills/tree/main/skills/docker-best-practices commit 671d9b6468

Frequently asked questions

npx skillmds@latest add hieutrtr/docker-best-practices