What it does
Docker containerization for development and production. Covers Dockerfiles, multi-stage builds, layer caching, Compose services, networking, volumes, health checks, security hardening, and production deployment patterns.
Skills ZICQ category:Security docker
Docker containerization for development and production. Covers Dockerfiles, multi-stage builds, layer caching, Compose services, networking, volumes, health checks, security hardening, and production deployment patterns.
Official URL:skills.sh
Intro in this page language first. The official description stays in its original wording; we do not rewrite SKILL.md.
Docker containerization for development and production. Covers Dockerfiles, multi-stage builds, layer caching, Compose services, networking, volumes, health checks, security hardening, and production deployment patterns.
** Containerizing applications, creating reproducible dev environments, orchestrating multi-service stacks, deploying to container platforms (ECS, Kubernetes, Fly.io, Railway, Coolify)
Per Agent Skills progressive disclosure: name and description load at startup (~100 tokens); the full SKILL.md body loads when the skill activates; scripts/, references/, and assets/ load only as needed. This file's sections: Docker; Overview; Quick Reference; Common Mistakes; Delegation; References.
File analysis: besides SKILL.md, the body references references/dockerfile-patterns.md, references/compose.md, references/security.md, references/buildx-and-multiplatform.md, references/ci-caching.md, references/monorepo-builds.md. Those resources load on demand.
DockerOverviewQuick ReferenceCommon MistakesDelegationReferences
· License:MIT
Source category:skills.sh agent-skill
namedockerdescriptionreferences/dockerfile-patterns.mdreferences/compose.mdreferences/security.mdreferences/buildx-and-multiplatform.mdreferences/ci-caching.mdreferences/monorepo-builds.mdreferences/debugging.mdThese paths are extracted from the text. Check the upstream package to verify the files exist.
Invocation syntax and available tools depend on your Agent client. Client integration guide ↗
Choose the target agent and installation scope, keep referenced package files, then verify the skill appears in the client's catalog.
This skill references supporting files. Retrieve the complete directory from the source; copying SKILL.md alone may leave missing dependencies.
Copy these instructions to a compatible agent and confirm the target directory matches your client.
Install the agent skill "docker" into my project. The full SKILL.md and official description are at https://zicq.com/en/skills/skl-eca8aafac1663cca-Docker.html Save it as .cursor/skills/docker/SKILL.md or .claude/skills/docker/SKILL.md and keep the frontmatter name and description exactly as-is. This skill also ships scripts/, references/, or assets/ — fetch the whole folder from https://github.com/oakoss/agent-skills instead of creating only a SKILL.md.
Requires Node.js and npx. First inspect the repository's skill list to confirm the name.
npx skills add 'https://github.com/oakoss/agent-skills' --list
npx skills add 'https://github.com/oakoss/agent-skills' --skill 'docker'
The CLI lets you choose the agent interactively. The default scope is the project; use -g for user scope. Confirm package availability with the discovery command, then use npx skills list to inspect installed skills.
name: docker description: | Docker containerization for development and production. Covers Dockerfiles, multi-stage builds, layer caching, Compose services, networking, volumes, health checks, security hardening, and production deployment patterns.
Docker packages applications into isolated containers that run consistently across environments. A Dockerfile defines the image build steps, Compose orchestrates multi-container services, and production patterns ensure small, secure, performant images.
When to use: Containerizing applications, creating reproducible dev environments, orchestrating multi-service stacks, deploying to container platforms (ECS, Kubernetes, Fly.io, Railway, Coolify).
When NOT to use: Simple static sites with no backend (use CDN deploy), single-binary CLI tools (distribute the binary), or when the target platform has native buildpacks (Heroku, Vercel) and you don't need container control.
| Pattern | Approach | Key Points |
| -------------------- | ---------------------------------------------- | ---------------------------------------------------- |
| Multi-stage build | Separate builder and production stages | 80%+ image size reduction, no dev deps in production |
| Layer caching | Copy lockfile first, install, then copy source | Dependency layer cached across builds |
| Non-root user | RUN adduser + USER in final stage | Never run production containers as root |
| Health check | HEALTHCHECK CMD curl or node/python check | Enables orchestrator restart on failure |
| .dockerignore | Exclude node_modules, .git, .env | Smaller build context, faster builds |
| Compose services | compose.yaml with service definitions | Dev environment in one command |
| Compose override | compose.prod.yaml with production settings | Environment-specific config without duplication |
| Named volumes | volumes: in Compose for persistent data | Survives container recreation |
| Build cache mount | RUN --mount=type=cache,target=/root/.npm | Persistent cache across builds |
| Secrets in build | RUN --mount=type=secret,id=token | Never bake secrets into image layers |
| Image pinning | Pin to major.minor or digest | Reproducible builds, avoid surprise breakage |
| Container networking | Custom bridge networks with service discovery | Containers resolve each other by service name |
| Compose watch | develop.watch with sync/rebuild actions | Live reload without volume mounts |
| Init process | --init flag or tini entrypoint | Proper signal handling and zombie reaping |
| Multi-platform | docker buildx build --platform | ARM (Apple Silicon, Graviton) + x86 in one image |
| Monorepo prune | turbo prune app --docker | Minimal build context from workspace dependencies |
| CI layer caching | cache-from/cache-to with GHA or registry | Avoid full rebuilds in CI pipelines |
| Debug containers | docker exec, docker logs, dive | Inspect running containers and image layers |
| Mistake | Correct Pattern |
| ----------------------------------------------- | ---------------------------------------------------------------- |
| Installing dev dependencies in production image | Multi-stage build: install in builder, copy artifacts to runtime |
| Copying source before installing dependencies | Copy lockfile first, npm ci, then copy source for cache reuse |
| Running as root in production | Create non-root user, USER directive in final stage |
| Hardcoding secrets in Dockerfile or ENV | Use build secrets (--mount=type=secret) or runtime env |
| Using latest tag for base images | Pin to specific version (node:24-alpine) |
| No .dockerignore file | Exclude node_modules, .git, .env, build artifacts |
| Using npm install instead of npm ci | npm ci for deterministic, lockfile-based installs |
| HEALTHCHECK missing | Add health check for orchestrator integration |
| Large base images (node:24) | Use alpine variants (node:24-alpine) for smaller images |
| Ignoring .env file precedence in Compose | environment: in Compose overrides .env file values |
| Building entire monorepo for one service | Use turbo prune --docker for minimal build context |
| No layer caching in CI | Use cache-from/cache-to with GHA or registry backend |
| Building only for x86 when deploying to ARM | Use docker buildx with --platform linux/amd64,linux/arm64 |
Task agent to audit Dockerfiles for size, security, and cachingExplore agent to discover existing Docker configurationsPlan agent for container orchestration strategyIf the
ci-cd-architectureskill is available, delegate CI/CD pipeline and deployment strategy to it. If theapplication-securityskill is available, delegate container security scanning and hardening review to it.
Security
Security-first skill vetting for AI agents. Use before installing any skill from ClawdHub, GitHub, or other sources. Checks for red flags, p…
Security
MoltGuard — OpenClaw security guard by OpenGuardrails. Install MoltGuard to protect you and your human from prompt injection, data exfiltrat…
Security
Use when reviewing code for security vulnerabilities, implementing authentication flows, auditing OWASP Top 10, configuring CORS/CSP headers…
Security
Security vetting protocol before installing any AI agent skill. Red flag detection for credential theft, obfuscated code, exfiltration. Risk…