# Docker Analysis Examples

## Example 1: Dockerfile Optimization

**Input:**
```dockerfile
FROM node:latest
COPY . .
RUN npm install
EXPOSE 3000
CMD ["node", "server.js"]
```

**Expected Output:**
Issues: :latest tag, poor layer caching, no .dockerignore, running as root. Optimized version with specific version, multi-stage build, proper layer ordering, non-root user.

## Example 2: Image Size Reduction

**Input:**
```
My Node.js Docker image is 1.2GB. How can I reduce it?
```

**Expected Output:**
Use alpine base (node:18-alpine), multi-stage build, remove dev dependencies, use npm ci, .dockerignore, example showing 200MB final image.

## Example 3: Security Hardening

**Input:**
```
Review security of my production Docker setup.
```

**Expected Output:**
Checklist: non-root user, vulnerability scanning, secrets management, network isolation, resource limits, read-only root filesystem, security updates.

## Common Use Cases

- Dockerfile optimization
- Image size reduction
- Security hardening
- Multi-stage builds
- Container orchestration prep
