[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EMVJCMV4E5WACYMM43AHFF":3,"skill-same:01M7EMVJCMV4E5WACYMM43AHFF":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7EMVJCMV4E5WACYMM43AHFF","docker-pro",null,"Docker guidance — Dockerfile best practices, multi-stage builds, Compose, networking, volumes, and image security.","TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-docker-pro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: docker-pro\ndescription: Docker guidance — Dockerfile best practices, multi-stage builds, Compose, networking, volumes, and image security.\ncategory: development\n---\n\n## Overview\n\nDocker packages applications and their dependencies into portable images that run identically anywhere the Docker runtime exists. Containers are the unit of deployment for modern infrastructure — understanding images, layers, networking, and volumes is prerequisite knowledge for Kubernetes, CI\u002FCD, and cloud platforms.\n\nThe common failure mode is treating Dockerfiles as an afterthought: bloated images, leaked secrets, and containers that work on a laptop but die in production. This skill covers writing production-grade Dockerfiles, using Compose for local development, and the security and operational practices that matter.\n\n## When to use\n\n- Writing or reviewing Dockerfiles for any language.\n- Shrinking image sizes and speeding up builds (multi-stage, layer caching).\n- Setting up Docker Compose for local development environments.\n- Debugging container networking, volumes, and permissions.\n- Securing images (non-root users, secret handling, base image choice).\n- Choosing between Docker, Podman, and other runtimes.\n- Preparing images for Kubernetes or any orchestrator.\n\n## Core concepts\n\n- **Images are layered.** Each Dockerfile instruction creates a layer; layers cache and reuse. Order instructions from least-frequently-changed (base image, system deps) to most-frequently-changed (app code) to maximize cache hits.\n- **Multi-stage builds.** Build in one stage (compilers, node_modules), copy artifacts into a slim runtime stage. This is the single biggest image-size win — a Go or Java build can drop from 1GB to 50MB.\n- **Small base images.** `alpine`, `distroless`, or `-slim` variants over full OS images. Smaller images pull faster, have fewer CVEs, and reduce attack surface. Distroless goes further: no shell, no package manager.\n- **`.dockerignore`.** Like `.gitignore` for the build context — exclude `.git`, `node_modules`, build artifacts, secrets. A bloated context slows every build and can leak files into images.\n- **Run as non-root.** Create a user and `USER` it. Root-in-container is still root-adjacent on the host if there's a breakout; non-root is cheap defense in depth.\n- **One process per container.** The container's PID 1 should be your app (use `exec` form `CMD` so signals propagate). Sidecars and init systems are orchestrator concerns, not image concerns.\n- **Layer caching in CI.** Cache layers between builds (registry cache, BuildKit cache mounts) — `RUN --mount=type=cache` for package managers avoids re-downloading dependencies every build.\n- **BuildKit.** The modern builder: parallel builds, cache mounts, secrets mounts (`--mount=type=secret`), SSH mounts. Enable it; the legacy builder is obsolete.\n- **Secrets never in layers.** `COPY .env` or `ARG` secrets persist in image history. Use BuildKit secret mounts or multi-stage builds that don't copy secrets into the final stage.\n- **Networking.** Bridge (default, isolated), host (no isolation, max perf), none, and user-defined networks for inter-container DNS. In Compose, services reach each other by service name automatically.\n- **Volumes vs bind mounts.** Named volumes for persistent data (databases), bind mounts for development (live code reload). Volumes survive container recreation; container filesystems don't.\n- **Healthchecks.** `HEALTHCHECK` instruction so orchestrators know when the app is actually ready — not just when the process started.\n- **Compose for dev.** Multi-service local environments (app + db + cache) in one YAML file. Profiles, overrides, and `.env` support keep dev\u002Fprod parity without production complexity.\n- **Image tagging.** Immutable tags per build (git SHA), mutable tags (`latest`) only for convenience. Deployments should reference immutable digests or SHA tags — `latest` in production is undebuggable.\n- **Scanning.** Scan images for CVEs in CI (Trivy, Grype, Docker Scout). Base images accumulate vulnerabilities; rebuild regularly, don't just rescan old images.\n\n## Practical workflow\n\n1. **Write the Dockerfile in cache order.** Base image → system deps → language deps (lockfile first) → app code → runtime config. Each step ordered by change frequency.\n   ```dockerfile\n   FROM node:22-slim AS deps\n   WORKDIR \u002Fapp\n   COPY package.json package-lock.json .\u002F\n   RUN --mount=type=cache,target=\u002Froot\u002F.npm npm ci\n   ```\n2. **Use multi-stage builds.** Separate `build` and `runtime` stages; copy only artifacts forward; final stage minimal.\n   ```dockerfile\n   FROM deps AS build\n   COPY . .\n   RUN npm run build\n   FROM node:22-slim AS runtime\n   WORKDIR \u002Fapp\n   COPY --from=build \u002Fapp\u002Fdist .\u002Fdist\n   COPY --from=deps \u002Fapp\u002Fnode_modules .\u002Fnode_modules\n   RUN useradd -r app && chown -R app:app \u002Fapp\n   USER app\n   CMD [\"node\", \"dist\u002Findex.js\"]\n   ```\n3. **Add `.dockerignore`.** Exclude `.git`, `node_modules`, `*.md`, local env files, and test artifacts — everything not needed at runtime.\n4. **Handle secrets with mounts.** `RUN --mount=type=secret,id=npmrc npm ci` keeps tokens out of layers; never `COPY` credential files.\n5. **Define healthchecks.** So orchestrators and Compose can gate on actual readiness:\n   ```dockerfile\n   HEALTHCHECK --interval=30s --timeout=3s CMD wget -qO- http:\u002F\u002Flocalhost:3000\u002Fhealth || exit 1\n   ```\n6. **Compose the dev environment.** App + dependencies in `compose.yaml`; named volumes for databases; bind mounts for code; override files for local tweaks.\n   ```yaml\n   services:\n     app:\n       build: .\n       ports: [\"3000:3000\"]\n       volumes: [\".\u002Fsrc:\u002Fapp\u002Fsrc\"]\n       depends_on: { db: { condition: service_healthy } }\n     db:\n       image: postgres:16\n       volumes: [\"pgdata:\u002Fvar\u002Flib\u002Fpostgresql\u002Fdata\"]\n   volumes: { pgdata: {} }\n   ```\n7. **Scan and tag in CI.** Build with BuildKit, scan with Trivy\u002FGrype (fail on critical), tag with git SHA, push immutable tags.\n8. **Run production-ready.** Resource limits, restart policies, log drivers with rotation, read-only filesystems where possible, and no `--privileged` without justification.\n\n## Common pitfalls\n\n- **Secrets in image layers** — `COPY .env` or `ARG` credentials persist in history; use secret mounts.\n- **Running as root** — default user is root; create and use a non-root user.\n- **Huge images** — full OS bases and build tools in the final stage; multi-stage + slim bases.\n- **Cache-busting order** — `COPY .` before `npm ci` invalidates the dependency layer on every code change; copy lockfiles first.\n- **Missing `.dockerignore`** — slow builds and leaked files; always define it.\n- **Shell-form CMD** — `CMD npm start` wraps in sh, breaking signal propagation; use exec form `[\"npm\", \"start\"]`.\n- **No healthcheck** — orchestrator thinks the container is ready when the process merely started; define one.\n- **`latest` in production** — undebuggable deploys; pin immutable tags or digests.\n- **Unbounded logs** — json-file logs filling disks; configure log rotation.\n- **Writable root filesystem** — unnecessary attack surface; `--read-only` with tmpfs for scratch space.\n- **Ignoring scans** — CVEs accumulating in base images; scan in CI and rebuild regularly.\n- **Bind mounts in production** — host-path coupling; use named volumes or object storage.\n- **No resource limits** — one container starving the host; set memory\u002FCPU limits.\n","## Overview\n\nDocker packages applications and their dependencies into portable images that run identically anywhere the Docker runtime exists. Containers are the unit of deployment for modern infrastructure — understanding images, layers, networking, and volumes is prerequisite knowledge for Kubernetes, CI\u002FCD, and cloud platforms.\n\nThe common failure mode is treating Dockerfiles as an afterthought: bloated images, leaked secrets, and containers that work on a laptop but die in production. This skill covers writing production-grade Dockerfiles, using Compose for local development, and the security and operational practices that matter.\n\n## When to use\n\n- Writing or reviewing Dockerfiles for any language.\n- Shrinking image sizes and speeding up builds (multi-stage, layer caching).\n- Setting up Docker Compose for local development environments.\n- Debugging container networking, volumes, and permissions.\n- Securing images (non-root users, secret handling, base image choice).\n- Choosing between Docker, Podman, and other runtimes.\n- Preparing images for Kubernetes or any orchestrator.\n\n## Core concepts\n\n- **Images are layered.** Each Dockerfile instruction creates a layer; layers cache and reuse. Order instructions from least-frequently-changed (base image, system deps) to most-frequently-changed (app code) to maximize cache hits.\n- **Multi-stage builds.** Build in one stage (compilers, node_modules), copy artifacts into a slim runtime stage. This is the single biggest image-size win — a Go or Java build can drop from 1GB to 50MB.\n- **Small base images.** `alpine`, `distroless`, or `-slim` variants over full OS images. Smaller images pull faster, have fewer CVEs, and reduce attack surface. Distroless goes further: no shell, no package manager.\n- **`.dockerignore`.** Like `.gitignore` for the build context — exclude `.git`, `node_modules`, build artifacts, secrets. A bloated context slows every build and can leak files into images.\n- **Run as non-root.** Create a user and `USER` it. Root-in-container is still root-adjacent on the host if there's a breakout; non-root is cheap defense in depth.\n- **One process per container.** The container's PID 1 should be your app (use `exec` form `CMD` so signals propagate). Sidecars and init systems are orchestrator concerns, not image concerns.\n- **Layer caching in CI.** Cache layers between builds (registry cache, BuildKit cache mounts) — `RUN --mount=type=cache` for package managers avoids re-downloading dependencies every build.\n- **BuildKit.** The modern builder: parallel builds, cache mounts, secrets mounts (`--mount=type=secret`), SSH mounts. Enable it; the legacy builder is obsolete.\n- **Secrets never in layers.** `COPY .env` or `ARG` secrets persist in image history. Use BuildKit secret mounts or multi-stage builds that don't copy secrets into the final stage.\n- **Networking.** Bridge (default, isolated), host (no isolation, max perf), none, and user-defined networks for inter-container DNS. In Compose, services reach each other by service name automatically.\n- **Volumes vs bind mounts.** Named volumes for persistent data (databases), bind mounts for development (live code reload). Volumes survive container recreation; container filesystems don't.\n- **Healthchecks.** `HEALTHCHECK` instruction so orchestrators know when the app is actually ready — not just when the process started.\n- **Compose for dev.** Multi-service local environments (app + db + cache) in one YAML file. Profiles, overrides, and `.env` support keep dev\u002Fprod parity without production complexity.\n- **Image tagging.** Immutable tags per build (git SHA), mutable tags (`latest`) only for convenience. Deployments should reference immutable digests or SHA tags — `latest` in production is undebuggable.\n- **Scanning.** Scan images for CVEs in CI (Trivy, Grype, Docker Scout). Base images accumulate vulnerabilities; rebuild regularly, don't just rescan old images.\n\n## Practical workflow\n\n1. **Write the Dockerfile in cache order.** Base image → system deps → language deps (lockfile first) → app code → runtime config. Each step ordered by change frequency.\n   ```dockerfile\n   FROM node:22-slim AS deps\n   WORKDIR \u002Fapp\n   COPY package.json package-lock.json .\u002F\n   RUN --mount=type=cache,target=\u002Froot\u002F.npm npm ci\n   ```\n2. **Use multi-stage builds.** Separate `build` and `runtime` stages; copy only artifacts forward; final stage minimal.\n   ```dockerfile\n   FROM deps AS build\n   COPY . .\n   RUN npm run build\n   FROM node:22-slim AS runtime\n   WORKDIR \u002Fapp\n   COPY --from=build \u002Fapp\u002Fdist .\u002Fdist\n   COPY --from=deps \u002Fapp\u002Fnode_modules .\u002Fnode_modules\n   RUN useradd -r app && chown -R app:app \u002Fapp\n   USER app\n   CMD [\"node\", \"dist\u002Findex.js\"]\n   ```\n3. **Add `.dockerignore`.** Exclude `.git`, `node_modules`, `*.md`, local env files, and test artifacts — everything not needed at runtime.\n4. **Handle secrets with mounts.** `RUN --mount=type=secret,id=npmrc npm ci` keeps tokens out of layers; never `COPY` credential files.\n5. **Define healthchecks.** So orchestrators and Compose can gate on actual readiness:\n   ```dockerfile\n   HEALTHCHECK --interval=30s --timeout=3s CMD wget -qO- http:\u002F\u002Flocalhost:3000\u002Fhealth || exit 1\n   ```\n6. **Compose the dev environment.** App + dependencies in `compose.yaml`; named volumes for databases; bind mounts for code; override files for local tweaks.\n   ```yaml\n   services:\n     app:\n       build: .\n       ports: [\"3000:3000\"]\n       volumes: [\".\u002Fsrc:\u002Fapp\u002Fsrc\"]\n       depends_on: { db: { condition: service_healthy } }\n     db:\n       image: postgres:16\n       volumes: [\"pgdata:\u002Fvar\u002Flib\u002Fpostgresql\u002Fdata\"]\n   volumes: { pgdata: {} }\n   ```\n7. **Scan and tag in CI.** Build with BuildKit, scan with Trivy\u002FGrype (fail on critical), tag with git SHA, push immutable tags.\n8. **Run production-ready.** Resource limits, restart policies, log drivers with rotation, read-only filesystems where possible, and no `--privileged` without justification.\n\n## Common pitfalls\n\n- **Secrets in image layers** — `COPY .env` or `ARG` credentials persist in history; use secret mounts.\n- **Running as root** — default user is root; create and use a non-root user.\n- **Huge images** — full OS bases and build tools in the final stage; multi-stage + slim bases.\n- **Cache-busting order** — `COPY .` before `npm ci` invalidates the dependency layer on every code change; copy lockfiles first.\n- **Missing `.dockerignore`** — slow builds and leaked files; always define it.\n- **Shell-form CMD** — `CMD npm start` wraps in sh, breaking signal propagation; use exec form `[\"npm\", \"start\"]`.\n- **No healthcheck** — orchestrator thinks the container is ready when the process merely started; define one.\n- **`latest` in production** — undebuggable deploys; pin immutable tags or digests.\n- **Unbounded logs** — json-file logs filling disks; configure log rotation.\n- **Writable root filesystem** — unnecessary attack surface; `--read-only` with tmpfs for scratch space.\n- **Ignoring scans** — CVEs accumulating in base images; scan in CI and rebuild regularly.\n- **Bind mounts in production** — host-path coupling; use named volumes or object storage.\n- **No resource limits** — one container starving the host; set memory\u002FCPU limits.\n",{"name":5,"category":24,"description":7},"development","main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-docker-pro",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill docker-pro",{"tool":39,"command":40},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill docker-pro",{"tool":42,"command":43},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill docker-pro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-docker-pro\u002FSKILL.md",true,[],[48,55,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":59,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]