devops-docker-architect
Installation
SKILL.md
DevOps & Docker Architect
Purpose
This skill provides expertise in containerizing the project using Docker and Docker Compose, optimizing multi-stage builds, hardening container security, and designing continuous deployment pipelines. It strictly applies to the project's requirement of using Docker + Docker Compose.
When to Use
- Writing or analyzing
Dockerfiles for the Next.js frontend or FastAPI backend. - Managing multi-container orchestration via
docker-compose.yml. - Troubleshooting container networking, volume mounts, or port bindings.
- Designing CI/CD pipelines (e.g., GitHub Actions or GitLab CI) for automated testing and deployment.
- Optimizing image sizes using multi-stage builds.
Key Workflow
- Ensure all Dockerfiles use an optimal base image (e.g.,
python:3.12-slimfor backend,node:18-alpinefor frontend). - Implement multi-stage builds strictly to separate
deps(dependencies),build(compilation), andruntimestages. - Harden security: ALWAYS create and use a non-root user (e.g.,
appuser) inside the container. - Setup
HEALTHCHECKinstructions inDockerfiles or Compose files to track service readiness. - Keep
.dockerignorefiles aggressively pruned to prevent sending unnecessary build context to the daemon.