docker-expert
Skill2 starsChanged 4 months agoMITView on GitHub
Advanced Docker containerization expert for multi-stage builds, image optimization, security hardening, and Compose orchestration. Use when the task involves `working with Dockerfile`, `docker-compose.yml`, `containerization`, `multi-stage builds`, or `optimizing Docker images`.
- Deletes or force-pushes
- Installs packages
12 other projects use a version of this.
Adopted by
Most recently taken up by
- MortuisVMain/ai-agent-superpowerstheir own version, first seen Sep 15, 2026
- Aarvion-AI/stackwise-skillstheir own version, first seen Aug 25, 2026
- TheHiddenDeveloper/jarvis-skillstheir own version, first seen Aug 19, 2026
- ElyzeSolutions/skillstheir own version, first seen Aug 6, 2026
- jshsakura/awesome-opencode-skillstheir own version, first seen Jul 8, 2026
- FilippoDeSilva/skillstheir own version, first seen Jun 26, 2026
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- vmDeshpande/ai-agent-automation★ 178same name
- jshsakura/awesome-opencode-skills★ 29same name
- Fandry96/k3-agentic-skills★ 27same name
- xfstudio/skills★ 9same name
- xcrrr/claude-skills★ 6same name
- Aarvion-AI/stackwise-skills★ 5same name
- k1lgor/virtual-company★ 4same name
- ai4brands-design/claude-skills★ 2same name
- FilippoDeSilva/skills★ 2same name
- ElyzeSolutions/skills★ 1same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository43 other files it gives its agents.
- accessibilitySkill
- best-practicesSkill
- brainstormingSkill
- core-web-vitalsSkill
- cypress-e2eSkill
- drizzle-ormSkill
- elixir-developmentSkill
- eslint-configSkill
- express-apiSkill
- frontend-designSkill
- github-actionsSkill
- go-developmentSkill
- grafana-dashboardsSkill
- grpc-apiSkill
- helm-chartsSkill
- jest-testingSkill
- kubernetes-orchestrationSkill
- makefileSkill
- markdown-a11ySkill
- nothing-designSkill
- performanceSkill
- php-developmentSkill
- pinned-tagSkill
- postgresql-developmentSkill
- pr-creatorSkill
- prettier-formattingSkill
- pydanticSkill
- qwik-developmentSkill
- rails-developmentSkill
- ruby-developmentSkill
- rust-async-patternsSkill
- seoSkill
- skill-creatorSkill
- solidjs-developmentSkill
- sqlalchemySkill
- sql-optimization-patternsSkill
- swift-ios-developmentSkill
- tensorflow-mlSkill
- testing-librarySkill
- trpc-type-safetySkill
- webapp-testingSkill
- web-quality-auditSkill
- zig-developmentSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Security First (Non-Root): NEVER run containers as root.
- Very specific: line 24
Secrets over Env Vars: Use Docker Secrets (secrets:) for sensitive data in docker-compose.yml rather than plain environment variables.
- Distinctive: line 26
Multi-Stage Builds: Always separate the builder (compilation, dependency fetching) from the final runtime image.
- Very specific: line 28
Minimal Attack Surface: Prefer alpine, slim, or distroless base images.
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
When to Use
- Creating or optimizing a
Dockerfilefor any project. - Setting up or reviewing
docker-compose.ymlfor local development or production. - Troubleshooting container security, large image sizes, or slow build times.
- Implementing multi-stage builds to separate dependencies from runtime.
Critical Patterns
- Security First (Non-Root): NEVER run containers as
root. Always create and switch to a non-root user via theUSERinstruction. - Secrets over Env Vars: Use Docker Secrets (
secrets:) for sensitive data indocker-compose.ymlrather than plain environment variables. - Multi-Stage Builds: Always separate the builder (compilation, dependency fetching) from the final runtime image. Do not ship build tools to production.
- Minimal Attack Surface: Prefer
alpine,slim, ordistrolessbase images. - Supply Chain Integrity: Pin base image versions down to the digest (e.g.,
alpine:3.21@sha256:xyz...). - Layer Caching: Order instructions by frequency of change. Copy and install dependencies before copying the rest of the source code.
- One Layer Operations: Chain
apt-get updatewithapt-get installusing&&and clear the cache (rm -rf /var/lib/apt/lists/*) in the exact sameRUNcommand.
Code Examples
Optimized Multi-Stage Dockerfile
# Stage 1: Build & Dependencies
FROM node:18-alpine AS deps
WORKDIR /app
COPY package*.json ./
RUN --mount=type=cache,target=/root/.npm \
npm ci --only=production
# Stage 2: Build source
FROM node:18-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build && npm prune --production
# Stage 3: Runtime
FROM node:18-alpine AS runtime
# Create non-root user explicitly
RUN addgroup -g 1001 -S nodejs && adduser -S appuser -u 1001 -G nodejs
WORKDIR /app
# Copy only what is strictly necessary
COPY --from=deps --chown=appuser:nodejs /app/node_modules ./node_modules
COPY --from=build --chown=appuser:nodejs /app/dist ./dist
# Drop privileges
USER appuser
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
CMD ["node", "dist/index.js"]Production-Ready Compose Pattern
version: '3.8'
services:
app:
build:
context: .
target: runtime
depends_on:
db:
condition: service_healthy
networks:
- frontend
- backend
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
db:
image: postgres:15-alpine
environment:
POSTGRES_DB_FILE: /run/secrets/db_name
POSTGRES_USER_FILE: /run/secrets/db_user
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
secrets:
- db_name
- db_user
- db_password
networks:
- backend
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
networks:
frontend:
backend:
internal: true
secrets:
db_name:
external: true
db_user:
external: true
db_password:
external: trueCommands
# Clean builds with no cache
docker build --pull --no-cache -t my-app:latest .
# Validate Compose configuration
docker-compose config
# Check local image sizes and tags
docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}"Resources
- Templates: See assets/.dockerignore for a production-ready
.dockerignoretemplate to optimize build context.
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.

