This repository contains production-grade Dockerfiles for building optimized container images. Each image is carefully crafted for specific use cases with security, performance, and maintainability in mind.
dockerfiles/
βββ π N8N/ # Custom N8N Images
βββ π TBD/ # JDK, Python, Node, Go, etc.
βββ π TBD/ # SQL/NoSQL with optimized configs
βββ π TBD/ # Nginx, Apache, Caddy with TLS setups
βββ π TBD/ # Jenkins, GitLab Runner, ArgoCD
βββ π TBD/ # Prometheus, Grafana, ELK stacks
βββ π TBD/ # CLI tools, backup utilities, etc.
β Pre-flight Checklist
Completed | Task |
---|---|
β | Docker Engine 20.10+ installed |
β | Minimum 2 CPU cores allocated |
β | 4GB+ RAM available |
β | docker-compose installed (for multi-container setups) |
β | Proper disk permissions set |
π οΈ Comprehensive Build Process
find . -name Dockerfile | sed 's//Dockerfile//g'
cd path/to/image-directory
docker build \
--no-cache \
--pull \
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
-t myorg/image-name:$(git rev-parse --short HEAD) .
docker scan myorg/image-name # Security scan
docker history myorg/image-name # Layer inspection
π Multi-Architecture Builds (ARM/x86)
docker buildx create --use
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t myorg/multiarch-image:latest \
--push .
π Production Deployment Checklist
- Image scanned for vulnerabilities (Trivy/Grype)
- Resource limits configured
- Read-only root filesystem enabled
- Non-root user configured
- Health checks implemented
- Proper logging configured
- Secrets management in place
π¦ Featured Images
π Curated Image Catalog
Image Features Size alpine-plus Alpine + core utilities 15MB distroless-plus Google Distroless + shell 25MB
Image Optimization Default Config postgres-optimized Connection pooling 100 max_connections redis-secure ACL enabled Protected mode on
graph TD
A[Load Balancer] --> B[Web Server]
B --> C[App Server]
C --> D[Database]
π§ͺ Image Validation Pipeline
container-structure-test test \
--image my-image \
--config tests/config.yaml
bats tests/runtime_checks.bats
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
aquasec/kube-bench:latest
π Hardening Measures
- All images use COPY --chown for proper permissions
- No secrets in build context
- Multi-stage builds to reduce attack surface
- DOCKER_CONTENT_TRUST=1 enforced
- Regular base image updates
Area | Owner | Reviewers |
---|---|---|
N8N | @core-team | @security |
DB Images | @db-team | @performance |
Web Servers | @web-team | @infra |
All images include:
SBOM generation
License scanning
Attribution files
β‘ Powered by Docker | π‘οΈ Security First | π Multi-Cloud Ready
Enjoying this project? Help me keep it alive and evolving:
Bitcoin:
13GdxyJ85Y78oq97Ktnr6fqdCUsa4vcMgp
Stay updated with my latest projects and tutorials: