Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
oakoss avatar

Docker

  • 92 installs
  • 14 repo stars
  • Updated March 2, 2026
  • oakoss/agent-skills

Helps with devops & ci/cd tasks during AI-assisted development.

About

docker is a Claude Code skill for devops & ci/cd. It helps solo builders move faster with AI-assisted coding.

  • docker
  • DevOps & CI/CD
  • AI-coding skill

Docker by the numbers

  • 92 all-time installs (skills.sh)
  • +8 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #565 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/oakoss/agent-skills --skill docker

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs92
repo stars14
Last updatedMarch 2, 2026
Repositoryoakoss/agent-skills

What it does

Helps with devops & ci/cd tasks during AI-assisted development.

Files

SKILL.mdMarkdownGitHub ↗

Docker

Overview

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.

Quick Reference

PatternApproachKey Points
Multi-stage buildSeparate builder and production stages80%+ image size reduction, no dev deps in production
Layer cachingCopy lockfile first, install, then copy sourceDependency layer cached across builds
Non-root userRUN adduser + USER in final stageNever run production containers as root
Health checkHEALTHCHECK CMD curl or node/python checkEnables orchestrator restart on failure
.dockerignoreExclude node_modules, .git, .envSmaller build context, faster builds
Compose servicescompose.yaml with service definitionsDev environment in one command
Compose overridecompose.prod.yaml with production settingsEnvironment-specific config without duplication
Named volumesvolumes: in Compose for persistent dataSurvives container recreation
Build cache mountRUN --mount=type=cache,target=/root/.npmPersistent cache across builds
Secrets in buildRUN --mount=type=secret,id=tokenNever bake secrets into image layers
Image pinningPin to major.minor or digestReproducible builds, avoid surprise breakage
Container networkingCustom bridge networks with service discoveryContainers resolve each other by service name
Compose watchdevelop.watch with sync/rebuild actionsLive reload without volume mounts
Init process--init flag or tini entrypointProper signal handling and zombie reaping
Multi-platformdocker buildx build --platformARM (Apple Silicon, Graviton) + x86 in one image
Monorepo pruneturbo prune app --dockerMinimal build context from workspace dependencies
CI layer cachingcache-from/cache-to with GHA or registryAvoid full rebuilds in CI pipelines
Debug containersdocker exec, docker logs, diveInspect running containers and image layers

Common Mistakes

MistakeCorrect Pattern
Installing dev dependencies in production imageMulti-stage build: install in builder, copy artifacts to runtime
Copying source before installing dependenciesCopy lockfile first, npm ci, then copy source for cache reuse
Running as root in productionCreate non-root user, USER directive in final stage
Hardcoding secrets in Dockerfile or ENVUse build secrets (--mount=type=secret) or runtime env
Using latest tag for base imagesPin to specific version (node:24-alpine)
No .dockerignore fileExclude node_modules, .git, .env, build artifacts
Using npm install instead of npm cinpm ci for deterministic, lockfile-based installs
HEALTHCHECK missingAdd health check for orchestrator integration
Large base images (node:24)Use alpine variants (node:24-alpine) for smaller images
Ignoring .env file precedence in Composeenvironment: in Compose overrides .env file values
Building entire monorepo for one serviceUse turbo prune --docker for minimal build context
No layer caching in CIUse cache-from/cache-to with GHA or registry backend
Building only for x86 when deploying to ARMUse docker buildx with --platform linux/amd64,linux/arm64

Delegation

  • Dockerfile review: Use Task agent to audit Dockerfiles for size, security, and caching
  • Compose exploration: Use Explore agent to discover existing Docker configurations
  • Architecture decisions: Use Plan agent for container orchestration strategy
If the ci-cd-architecture skill is available, delegate CI/CD pipeline and deployment strategy to it.
If the application-security skill is available, delegate container security scanning and hardening review to it.

References

  • Dockerfile patterns: multi-stage builds, layer caching, and image optimization
  • Compose: services, networking, volumes, and environment management
  • Security: non-root users, secrets, scanning, and production hardening
  • Buildx: multi-platform builds for ARM and x86
  • CI: GitHub Actions caching, registry push, and automated builds
  • Monorepo: Turborepo prune, pnpm workspaces, and selective builds
  • Debugging: logs, exec, inspect, layer analysis, and network troubleshooting

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.