Skip to content
Skills Library
DevOps & cloud · Building & coding

docker-expert

/docker-expert

Expert in Docker containerization including Dockerfile optimization, multi-stage builds, Docker Compose, and container security. Use for containerization questions, image optimization, and debugging container issues.

Licence
Apache-2.0
Last repository change
17.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 17.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Expert in Docker containerization including Dockerfile optimization, multi-stage builds, Docker Compose, and container security. Use for containerization questions, image optimization, and debugging container issues.

Original author description

Expert in Docker containerization including Dockerfile optimization, multi-stage builds, Docker Compose, and container security. Use for containerization questions, image optimization, and debugging container issues.

How it works

  1. Dockerfile Best Practices
  2. Docker Compose
  3. Common Commands
  4. Debugging
Original SKILL.md headings · 115 lines, 307 words
SKILL.md preview
---
name: docker-expert
description: Expert in Docker containerization including Dockerfile optimization, multi-stage builds, Docker Compose, and container security. Use for containerization questions, image optimization, and debugging container issues.
required-capability: coding
---

# Docker Expert

You are a Senior Container Engineer specializing in Docker and containerization.

## Dockerfile Best Practices

### Multi-Stage Build
```dockerfile
# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production

# Production stage
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/node_modules ./node_modules
COPY . .
USER node
EXPOSE 3000
CMD ["node", "server.js"]
```

### Layer Optimization
- Order instructions by change frequency (least → most)
- Combine RUN commands to reduce layers
- Use `.dockerignore` to exclude unnecessary files
- Clean up in the same layer that creates files

### Security
- Use specific base image tags (not `latest`)
- Run as non-root user
- Don't store secrets in images
- Scan images for vulnerabilities
- Use minimal base images (alpine, distroless)

## Docker Compose

```yaml
version: '3.8'
services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "3000:3000"
    environment:
      - NODE_ENV=production
    depends_on:
      db:
        condition: service_healthy
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
      interval: 30s
      timeout: 10s
      retries: 3

  db:
    image: postgres:15-alpine
    volumes:
      - postgres_data:/var/lib/postgresql/data
    environment:
      POSTGRES_PASSWORD_FILE: /run/secrets/db_password
    secrets:
      - db_password
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]

volumes:
  postgres_data:

secrets:
  db_password:
    file: ./secrets/db_password.txt
```

## Common Commands

```bash
# Build with no cache
docker build --no-cache -t myapp .

# Run with resource limits
docker run -m 512m --cpus=1 myapp

# Debug container
docker exec -it <container> sh
docker logs -f <container>

# Clean up
docker system prune -a --volumes
```

## Debugging

### Container Won't Start
1. Check logs: `docker logs <container>`
2. Run interactively: `docker run -it <image> sh`
3. Check entrypoint/cmd
4. Verify environment variables

### Image Too Large
1. Use multi-stage builds
2. Use alpine/slim base images
3. Remove dev dependencies
4. Clean package manager cache in same layer

### Networking Issues
- Use `docker network inspect`
- Check port mappings
- Verify service names for DNS resolution

Versions

RepositoryScoreLicence
This page · traylinx/switchAILocal100Apache-2.0
seaworld008/commonly-used-high-value-skills100MIT
hybridlabor-api/aos100Apache-2.0
agentic-swe/agentic-swe100MIT
personamanagmentlayer/pcl100Apache-2.0
aarvion-ai/stackwise-skills100MIT
miaoge-ge/coding-agent-skills100MIT

Database snapshot: 13.11.2026 · package version 0942ac42c01f (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100devops-docker-patterns
    Docker containerization expert specializing in multi-stage builds, image optimization, Docker Compose patterns, and production container security. Use for Dockerfile optimization, compose configurations, and container best practices.
  • 100docker
    Expert Docker containerization assistance covering multi-stage Dockerfiles, Docker Compose, layer caching, and container security. Use when containerizing applications, creating reproducible environments, or optimizing images.
  • 100docker-containerization
    Containerize applications with multi-stage Dockerfiles, Docker Compose orchestration, image optimization, and container security. Covers Python, Node.js, and multi-service architectures. Triggers on Docker, containerization, or container orchestration requests.
  • 95containerization-docker-best-practices
    Comprehensive best practices for creating optimized, secure, and efficient Docker images and managing containers. Covers multi-stage builds, image layer optimization, security scanning, and runtime best practices. Triggers on:…
  • 100docker
    Docker containerization. Covers Dockerfile, images, and best practices. Use for containerizing applications. USE WHEN: user mentions "dockerfile", "docker build", "docker run", "containerize", "docker image", "multi-stage build", asks about "how to dockerize", "container…
  • 100docker-development
    Use when optimising a Dockerfile, creating or improving docker-compose configurations, implementing multi-stage builds, auditing container security, or reducing image size. Triggers on "Dockerfile", "docker-compose", "container", "image size", "build cache", or "Docker best practices".

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.