docker-compose-setup
Skill1 starsChanged 2 months agoMITView on GitHub
Docker Compose project setup for Go applications with E2E testing isolation, multi-file strategies, and optional Podman/Kubernetes/DevOps support
- Reads credentials
In this repository30 other files it gives its agents.
- arch-linux-cachyosSkill
- arch-linux-triageSkill
- bash-defensive-patternsSkill
- bash-linuxSkill
- bash-scriptingSkill
- beansSkill
- context7Skill
- audioSkill
- deploymentSkill
- ecsSkill
- game-loopSkill
- inputSkill
- physicsSkill
- renderingSkill
- resourcesSkill
- ebitenSkill
- geminiSkill
- go-browser-testsSkill
- go-devSkill
- go-fluent-testingSkill
- go-htmx-frontendSkill
- go-setupSkill
- interactive-browser-testingSkill
- keep-on-goingSkill
- mcpcSkill
- minimaxSkill
- pixellabSkill
- playwright-mcpSkill
- public-repo-maturitySkill
- searxngSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
28 rules. About 0 are common, 28 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈28
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 43
ALL docker/compose commands MUST be in justfile
- Distinctive: line 44
NEVER run raw docker compose commands
- Distinctive: line 45
Use variables for compose file paths
- Distinctive: line 50
ALWAYS use multi-stage builds
- Distinctive: line 51
ALWAYS use distroless or scratch for production
- Distinctive: line 52
ALWAYS pin Go version
- Distinctive: line 53
ALWAYS use build caches
- Distinctive: line 54
NEVER run as root in production
- Distinctive: line 58
NO version field (deprecated)
- Distinctive: line 60
ALWAYS use depends_on with condition
- Distinctive: line 61
ALWAYS use named volumes for persistence
- Distinctive: line 62
NEVER expose ports in production compose
- Distinctive: line 66
ALWAYS use isolated compose file
- Distinctive: line 67
ALWAYS use tmpfs for test databases
- Distinctive: line 68
ALWAYS cleanup with down -v
- Distinctive: line 69
ALWAYS use unique project names
- Distinctive: line 70
NEVER share networks with dev
- Distinctive: line 74
NEVER run containers as root
- Distinctive: line 76
ALWAYS use .env files
- Distinctive: line 77
ALWAYS scan images for vulnerabilities
- Distinctive: line 78
ALWAYS pin image versions
- Distinctive: line 193
NEVER run raw docker compose commands (use justfile)
- Distinctive: line 194
NEVER use version field in compose files
- Distinctive: line 195
NEVER run containers as root in production
- Distinctive: line 196
NEVER hardcode secrets in compose files
- Distinctive: line 198
NEVER share test and dev networks
- Distinctive: line 199
NEVER forget cleanup in CI
- Distinctive: line 200
NEVER use :latest tag in production
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
What I do
Comprehensive Docker Compose setup for Go applications following 2026 best practices.
Core Capabilities
- Docker Compose Project Setup - Production-ready compose configurations
- E2E Testing Isolation - Dual compose file strategy for isolated test environments
- Multi-Stage Dockerfiles - Optimized Go application images
- Podman Support - Docker-compatible alternative with rootless by default
- Kubernetes Ready - Local development with Kind/Minikube
- DevOps Integration - CI/CD pipelines and infrastructure as code
References
Specialized topics are split into focused reference files:
- Multi-Stage Dockerfile — Production & development Dockerfiles, dependency caching, distroless runtime
- Docker Compose — Base structure, dev override, migration pattern, healthchecks
- E2E Testing & CI/CD — Dual compose strategy, test runner, GitHub Actions, GitLab CI
- Best Practices & IaC — Docker Compose rules, multi-file strategy, healthcheck reference
- Podman — Compatibility, commands, quadlet systemd integration
- Kubernetes — Kind, Minikube, Skaffold configurations
Critical Rules
Justfile (MANDATORY)
- ALL docker/compose commands MUST be in justfile
- NEVER run raw docker compose commands
- Use variables for compose file paths
- Group related commands (dev-, test-, prod-*)
Dockerfile
- ALWAYS use multi-stage builds
- ALWAYS use distroless or scratch for production
- ALWAYS pin Go version
- ALWAYS use build caches
- NEVER run as root in production
Docker Compose
- NO version field (deprecated)
- ALWAYS define healthchecks
- ALWAYS use depends_on with condition
- ALWAYS use named volumes for persistence
- NEVER expose ports in production compose
E2E Testing
- ALWAYS use isolated compose file
- ALWAYS use tmpfs for test databases
- ALWAYS cleanup with down -v
- ALWAYS use unique project names
- NEVER share networks with dev
Security
- NEVER run containers as root
- NEVER hardcode secrets
- ALWAYS use .env files
- ALWAYS scan images for vulnerabilities
- ALWAYS pin image versions
Justfile Commands (MANDATORY)
ALL docker/compose commands MUST be in justfile, never raw bash:
# justfile
# Variables
docker := "docker"
compose := docker + " compose"
compose_test := compose + " -f docker-compose.test.yml"
compose_dev := compose + " -f docker-compose.yml -f docker-compose.dev.yml"
compose_prod := compose + " -f docker-compose.yml -f docker-compose.prod.yml"
project_name := "e2e-" + env_var_or_default("BUILD_ID", "local")
# Development
default: dev-up
dev-up:
{{ compose_dev }} up -d
dev-logs:
{{ compose_dev }} logs -f app
dev-down:
{{ compose_dev }} down
dev-build:
{{ compose_dev }} build
# E2E Testing
test-e2e-up:
{{ compose_test }} up -d --build
test-e2e-run:
go test -v -count=1 ./test/e2e/...
test-e2e-down:
{{ compose_test }} down -v --remove-orphans
test-e2e: test-e2e-up test-e2e-run test-e2e-down
test-e2e-ci:
{{ compose }} -p {{ project_name }} -f docker-compose.test.yml \
up --build --abort-on-container-exit --exit-code-from app-test
test-e2e-cleanup:
{{ compose }} -p {{ project_name }} -f docker-compose.test.yml \
down -v --remove-orphans
# Production
prod-up:
{{ compose_prod }} up -d
prod-down:
{{ compose_prod }} down
prod-build:
{{ compose_prod }} build
# Cleanup
clean:
{{ compose }} down -v --remove-orphans --rmi local
clean-all:
{{ compose }} down -v --remove-orphans --rmi local
docker system prune -f
# Podman (alternative)
podman-up:
podman compose -f docker-compose.yml -f docker-compose.dev.yml up -d
# Kubernetes
k8s-kind-create:
kind create cluster --config kind-config.yaml
k8s-kind-load:
kind load docker-image myapp:latest
k8s-deploy:
kubectl apply -f k8s/
k8s-kind-delete:
kind delete clusterUsage
# Development
just dev-up
just dev-logs
just dev-down
# E2E Testing
just test-e2e
# CI Pipeline
just test-e2e-ci
# Production
just prod-up
# Cleanup
just cleanForbidden
- NEVER run raw docker compose commands (use justfile)
- NEVER use version field in compose files
- NEVER run containers as root in production
- NEVER hardcode secrets in compose files
- NEVER skip healthchecks
- NEVER share test and dev networks
- NEVER forget cleanup in CI
- NEVER use :latest tag in production
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

