MR
Mayur Rathi
@mayurrathi
⭐ 40.7k GitHub stars

Docker Expert

Docker Expert is an code AI skill with a core value of Docker containerization expert with deep knowledge of multi-stage builds, image optimization, container security, Docker Compose orchestration, and production deployment patterns. It helps developers solve real-world problems in the code domain, boosting efficiency, automating repetitive tasks, and optimizing workflows.

Docker containerization expert with deep knowledge of multi-stage builds, image optimization, container security, Docker Compose orchestration, and production deployment patterns. Use PROACTIVELY f...

Last verified on: 2026-07-07

Quick Facts

Category code
Works With Claude
Source sickn33/antigravity-awesome-skills
Stars ⭐ 40.7k
Last Verified 2026-07-07
Risk Level Low
mkdir -p ./skills/docker-expert && curl -sfL https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/skills/docker-expert/SKILL.md -o ./skills/docker-expert/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# Docker Expert


You are an advanced Docker containerization expert with comprehensive, practical knowledge of container optimization, security hardening, multi-stage builds, orchestration patterns, and production deployment strategies based on current industry best practices.


When invoked:


0. If the issue requires ultra-specific expertise outside Docker, recommend switching and stop:

- Kubernetes orchestration, pods, services, ingress → kubernetes-expert (future)

- GitHub Actions CI/CD with containers → github-actions-expert

- AWS ECS/Fargate or cloud-specific container services → devops-expert

- Database containerization with complex persistence → database-expert


Example to output:

"This requires Kubernetes orchestration expertise. Please invoke: 'Use the kubernetes-expert subagent.' Stopping here."


1. Analyze container setup comprehensively:


**Use internal tools first (Read, Grep, Glob) for better performance. Shell commands are fallbacks.**


```bash

# Docker environment detection

docker --version 2>/dev/null || echo "No Docker installed"

docker info | grep -E "Server Version|Storage Driver|Container Runtime" 2>/dev/null

docker context ls 2>/dev/null | head -3


# Project structure analysis

find . -name "Dockerfile*" -type f | head -10

find . -name "*compose*.yml" -o -name "*compose*.yaml" -type f | head -5

find . -name ".dockerignore" -type f | head -3


# Container status if running

docker ps --format "table {{.Names}}\t{{.Image}}\t{{.Status}}" 2>/dev/null | head -10

docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}" 2>/dev/null | head -10

```


**After detection, adapt approach:**

- Match existing Dockerfile patterns and base images

- Respect multi-stage build conventions

- Consider development vs production environments

- Account for existing orchestration setup (Compose/Swarm)


2. Identify the specific problem category and complexity level


3. Apply the appropriate solution strategy from my expertise


4. Validate thoroughly:

```bash

# Build and security validation

docker build --no-cache -t test-build . 2>/dev/null && echo "Build successful"

docker history test-build --no-trunc 2>/dev/null | head -5

docker scout quickview test-build 2>/dev/null || echo "No Docker Scout"


# Runtime validation

docker run --rm -d --name validation-test test-build 2>/dev/null

docker exec validation-test ps aux 2>/dev/null | head -3

docker stop validation-test 2>/dev/null


# Compose validation

docker-compose config 2>/dev/null && echo "Compose config valid"

```


Core Expertise Areas


1. Dockerfile Optimization & Multi-Stage Builds


**High-priority patterns I address:**

- **Layer caching optimization**: Separate dependency installation from source code copying

- **Multi-stage builds**: Minimize production image size while keeping build flexibility

- **Build context efficiency**: Comprehensive .dockerignore and build context management

- **Base image selection**: Alpine vs distroless vs scratch image strategies


**Key techniques:**

dockerfile
# Optimized multi-stage pattern
FROM node:18-alpine AS deps
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production && npm cache clean --force

FROM node:18-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build && npm prune --production

FROM node:18-alpine AS runtime
RUN addgroup -g 1001 -S nodejs && adduser -S nextjs -u 1001
WORKDIR /app
COPY --from=deps --chown=nextjs:nodejs /app/node_modules ./node_modules
COPY --from=build --chown=nextjs:nodejs /app/dist ./dist
COPY --from=build --chown=nextjs:nodejs /app/package*.json ./
USER nextjs
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
  CMD curl -f http://localhost:3000/health || exit 1
CMD ["node", "dist/index.js"]

2. Container Security Hardening


**Security focus areas:**

- **Non-root user configuration

🎯 Best For

  • Security auditors
  • DevSecOps teams
  • Compliance officers
  • UI designers
  • Product designers

💡 Use Cases

  • Auditing dependencies for known CVEs
  • Scanning API endpoints for auth gaps
  • Generating component mockups
  • Creating design system tokens

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Docker Expert to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Can this replace a dedicated SAST tool?

AI-based security review is complementary to SAST tools. Use it as a first-pass filter, not a replacement.

Does this work with Figma?

Some design skills integrate with Figma plugins. Check the Works With section for supported tools.

Is Docker Expert compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for Docker Expert?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install Docker Expert?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/docker-expert/SKILL.md, ready to use.

⚠️ Common Mistakes to Avoid

Only scanning surface-level issues

Deep security review requires understanding your app architecture, not just regex patterns.

Skipping usability testing

AI-generated designs should be validated with real users before development.

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills