# Docker

> Generates Dockerfile in project root for application containerization and deployment with conditional component library and Datadog integration.

- Skill: `sayali-ingle-pdl/docker` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add sayali-ingle-pdl/docker`
- Raw SKILL.md: https://api.skillmd.com/api/skills/sayali-ingle-pdl/docker/raw
- Safety review: pending (external: skill-scanner PASS, skillspector CAUTION)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: sayali-ingle-pdl (https://skillmd.com/u/sayali-ingle-pdl)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/sayali-ingle-pdl/docker

---


# Docker Skill

## Purpose
Generate Dockerfile in the project root directory for containerization and deployment.

## Output
Create the file: `Dockerfile` (in project root)

## Template
See: `examples.md` for the exact configuration template with placeholders.

## Conditional Logic

### Component Library Authentication
**Check parameter**: `include_component_library`

**If "yes"**: Replace `{{COMPONENT_LIBRARY_AUTH}}` with:
```dockerfile
RUN --mount=type=secret,id=vite_access_token \
export VITE_ACCESS_TOKEN=$(cat /run/secrets/vite_access_token) && \
echo "@RoyalAholdDelhaize:registry=https://npm.pkg.github.com" > .npmrc && \
echo "//npm.pkg.github.com/:_authToken=${VITE_ACCESS_TOKEN}" >> .npmrc
```

**If "no"**: Replace `{{COMPONENT_LIBRARY_AUTH}}` with empty string (remove lines)

**Note**: `RUN npm install` is always present after the placeholder, regardless of component library choice.

## Key Features
- **Base image**: Ubuntu Node.js 22 LTS from Azure Container Registry
- **Quality checks**: Runs lint, stylelint, and unit tests during build
- **Nginx**: Installs and configures nginx for serving static files
- **Security**: Runs as non-root user (nodejs_svc)
- **Port**: Exposes 8080
- **Optimization**: Cleans apt cache to reduce image size

## Notes
- All configuration values are production-ready defaults
- Build fails if quality checks don't pass
- Component library authentication uses Docker secrets for security
- References nginx configuration files created by nginx skills

