Skip to content
Back to skills

Docker Kubernetes

ASecurity

Containerization, orchestration, and deployment with Docker and K8s

  • 57 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 17, 2026
devopsshellbashsqlnextjsnodedockerkubernetesapidatabase

Works with

  • api

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill docker-kubernetes --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Docker Kubernetes?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Docker Kubernetes
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-docker-kubernetes/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-docker-kubernetes)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Docker & Kubernetes
description: Containerization, orchestration, and deployment with Docker and K8s
---

# Docker & Kubernetes Skill

## Docker Basics

### Dockerfile for Next.js
```dockerfile
# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

# Production stage
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV production

# Copy necessary files
COPY --from=builder /app/next.config.js ./
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static

EXPOSE 3000
ENV PORT 3000
CMD ["node", "server.js"]
```

### Docker Compose
```yaml
version: '3.8'
services:
  web:
    build: .
    ports:
      - "3000:3000"
    environment:
      - DATABASE_URL=${DATABASE_URL}
    depends_on:
      - db
      - redis
  
  db:
    image: postgres:16-alpine
    volumes:
      - postgres_data:/var/lib/postgresql/data
    environment:
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
  
  redis:
    image: redis:7-alpine
    volumes:
      - redis_data:/data

volumes:
  postgres_data:
  redis_data:
```

## Docker Commands

```bash
# Build image
docker build -t smarter-poker .

# Run container
docker run -p 3000:3000 smarter-poker

# View running containers
docker ps

# View logs
docker logs -f container_id

# Enter container shell
docker exec -it container_id sh

# Stop all containers
docker stop $(docker ps -q)

# Clean up
docker system prune -a
```

## Kubernetes Deployment

### deployment.yaml
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: smarter-poker
spec:
  replicas: 3
  selector:
    matchLabels:
      app: smarter-poker
  template:
    metadata:
      labels:
        app: smarter-poker
    spec:
      containers:
      - name: web
        image: smarter-poker:latest
        ports:
        - containerPort: 3000
        resources:
          limits:
            memory: "512Mi"
            cpu: "500m"
        env:
        - name: DATABASE_URL
          valueFrom:
            secretKeyRef:
              name: app-secrets
              key: database-url
---
apiVersion: v1
kind: Service
metadata:
  name: smarter-poker-service
spec:
  type: LoadBalancer
  ports:
  - port: 80
    targetPort: 3000
  selector:
    app: smarter-poker
```

## Useful Tools
- `lazydocker` - TUI for Docker
- `dive` - Analyze Docker image layers
- `hadolint` - Dockerfile linter

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.