Official agent skill

Docker Project Foundations

by docker in docker/skills

A skill your agent uses when setting up, initializing, or Dockerizing a project, even if the user doesn't explicitly mention Docker but describes a need for containerized local development, adding a…

OfficialApache-2.0Auto-check: warningsDevOps & Cloud

Install Docker Project Foundations

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add docker/skills --skill docker-project-foundations -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install docker/skills docker-project-foundations --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/docker/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/docker-project-foundations .claude/skills/docker-project-foundations && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
docker-project-foundations
GitHub stars
539
Token cost
~1.9k tokens
SKILL.md length
900 words
Files
9 (incl. scripts, references, assets)
Skills in repo
11
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when setting up, initializing, or Dockerizing a project, even if the user doesn't explicitly mention Docker but describes a need for containerized local development, adding a…

  • Works in 3 steps: .dockerignore — Create this first so the… → Dockerfile — Create a working starter… → compose.yaml — Create a local…
  • Dockerizing a project
  • SKILL.md covers Overview, When to use this skill, Do not use this skill when and Core guidance, plus 5 more sections
  • Runs Shell scripts from its folder; calls docker, bash and npm

What it does

Docker Project Foundations is an agent skill from docker/skills, published by the product's own GitHub organization. Use this skill when setting up, initializing, or Dockerizing a project, even if the user doesn't explicitly mention Docker but describes a need for containerized local development, adding a database or cache dependency, or running services without host-level installs. Covers Dockerfile, compose.yaml, and .dockerignore creation with Docker best practices.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including scripts, reference files and assets (for example `agents/openai.yaml`, `assets/compose-dev.yaml` and `checks/verification.md`). Compatibility notes: Requires Docker 20.10+ and Docker Compose v2.

It sits in DevOps & Cloud, covering Containers. It works with Docker and npm. The repository describes itself as: A collection of Docker skills for AI coding agents to help them build, test, debug, and optimize containerized apps with consistent, reusable workflows. The licence is Apache-2.0.

When your agent uses it

  • Dockerizing a project
  • Even if the user doesnt explicitly mention Docker but describes a need for containerized local development
  • Adding a database
  • Cache dependency

Example prompts

  • “/docker-project-foundations”

Requirements

  • Node.js
  • A Bash shell
  • Docker
  • Compatibility (from SKILL.md): Requires Docker 20.10+ and Docker Compose v2.

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. .dockerignore — Create this first so the initial build context is small and safe. See assets/dockerignore-example for a reference.
  2. Dockerfile — Create a working starter image definition that the project can build and run with. See assets/Dockerfile.simple.
  3. compose.yaml — Create a local development stack that includes the application service and any required dependencies. See…

What it can do on your machine

Read from SKILL.md and the folder at commit f791727. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • docker
    • bash
    • npm
    • brew
    • apt

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use docker and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires Docker 20.10+ and Docker Compose v2.

    From compatibility in the SKILL.md frontmatter.

Context cost

Docker Project Foundations loads about 1.9k tokens when it runs, and up to ~2.7k if it reads all its reference files. Until then it costs about 96 tokens; SKILL.md has 900 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~96
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:44
    - Exclude `.npmrc` at every depth with `**/.npmrc` in `.dockerignore`; otherwise a broad source copy can persist credent
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:47
    cker build --secret id=npmrc,src="$HOME/.npmrc" .
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:61
    Build with `NPMRC_PATH="$HOME/.npmrc" docker compose -f compose.yaml -f compose.npm.yaml build`. This grants build-tim
  • NoteMentions a .env fileSKILL.md:79
    tartup, label it clearly and document a `.env` override.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from docker/skills at commit f791727, republished under its Apache-2.0 licence (© docker). 900 words, ~1,862 tokens.

Download SKILL.mdSave it as .claude/skills/docker-project-foundations/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
docker-project-foundations
description
Use this skill when setting up, initializing, or Dockerizing a project, even if the user doesn't explicitly mention Docker but describes a need for containerized local development, adding a database or cache dependency, or running services without host-level installs. Covers Dockerfile, compose.yaml, and .dockerignore creation with Docker best practices.
compatibility
Requires Docker 20.10+ and Docker Compose v2.
license
Apache-2.0

Docker Project Foundations

Overview

This skill guides you in Dockerizing a project from scratch. It focuses on creating the initial Docker file set, choosing a sane layout, and preferring containerized dependencies over host-level installs.

When to use this skill

Activate this skill when:

  • A user asks you to set up, initialize, or Dockerize a project
  • A project needs an initial Dockerfile, compose.yaml, or .dockerignore and does not have one
  • A user wants to add a service dependency (database, cache, message queue) to a project
  • A user asks how to run or develop a project locally and Docker is available

Do not use this skill when

Do not use this skill when:

  • The user explicitly wants to avoid Docker
  • The project already has a mature Docker setup and only needs minor edits
  • The main task is optimizing an existing Dockerfile
  • The main task is editing or debugging an existing Compose stack

Core guidance

Always create these three files

When Dockerizing a project, always produce all three:

  1. .dockerignore — Create this first so the initial build context is small and safe. See assets/dockerignore-example for a reference.
  2. Dockerfile — Create a working starter image definition that the project can build and run with. See assets/Dockerfile.simple.
  3. compose.yaml — Create a local development stack that includes the application service and any required dependencies. See assets/compose-dev.yaml.
npm registry credentials
  • Exclude .npmrc at every depth with **/.npmrc in .dockerignore; otherwise a broad source copy can persist credentials in image layers.
  • The Node.js starter mounts npmrc as a BuildKit secret for both npm ci steps. Public-package builds need no secret. For private registries, pass the config explicitly:
    bash
    DOCKER_BUILDKIT=1 docker build --secret id=npmrc,src="$HOME/.npmrc" .
    Use the actual config path if the project keeps it elsewhere. Never copy the credential file or pass its values through ARG or ENV. Dependency scripts run during installation can access the mounted secret; use trusted dependencies and a least-privilege registry token.
  • For private-registry builds through Compose, add this optional override as compose.npm.yaml alongside the starter's compose.yaml:
    yaml
    services:
      app:
        build:
          secrets:
            - npmrc
    secrets:
      npmrc:
        file: ${NPMRC_PATH:?Set NPMRC_PATH to your npm config file}
    Build with NPMRC_PATH="$HOME/.npmrc" docker compose -f compose.yaml -f compose.npm.yaml build. This grants build-time access only, not a runtime secret. Public-package builds should omit the override so no credential file is required.
Prefer Dockerized dependencies over host installs

When a project needs a database (Postgres, MySQL, MongoDB), cache (Redis, Memcached), queue (RabbitMQ, Kafka), or any other infrastructure service:

  • Always define it as a service in compose.yaml instead of telling the user to install it on the host.
  • Never suggest brew install postgres, apt install redis, or similar host-level installs for development dependencies.
  • Use official Docker images from Docker Hub for these services.
  • Configure services with environment variables, not config files baked into images.
Bootstrap checklist
  • Name the file compose.yaml rather than legacy Compose filenames.
  • Put all three files at the project root unless there is a clear multi-service layout that justifies a docker/ subdirectory.
  • Ensure the initial setup can build and start locally with one command path.
  • Bind published application ports to loopback by default. Widen the host address only when another device must reach the development service.
  • Keep unauthenticated datastores on the Compose network instead of publishing their ports. If local host tools require database access, publish only to loopback.
  • If a development-only credential fallback enables one-command startup, label it clearly and document a .env override.
  • Use Compose services for local databases, caches, and queues instead of host installs.
  • Keep the first scaffold simple; defer detailed image optimization and advanced Compose tuning to the owning skills.
Show full SKILL.md (332 more words)Show less
Development vs production
  • Development: Use bind mounts for live reload, publish application ports on loopback by default, and enable verbose logging. Keep unauthenticated datastores on the Compose network; publish a datastore port only on loopback when local host tools require it.
  • Production: Use multi-stage builds, copy only built artifacts, do not mount source code, minimize image layers, set appropriate resource limits.
  • Keep a single Dockerfile that supports both via build stages and build arguments when possible.
File placement
  • Place Dockerfile at the project root (or in a docker/ subdirectory if the project has multiple services).
  • Place compose.yaml at the project root.
  • Place .dockerignore at the project root, next to the Dockerfile.
  • For Dockerfile optimization, cache strategy, non-root execution, and image hardening, use docker-build-strategies.
  • For service dependencies, health checks, overrides, volumes, networks, and Compose debugging, use docker-compose-patterns.
  • For destructive Docker CLI commands (docker system prune, docker rm -f, image/network/builder pruning) and a cross-product index of destructive-command guardrails, use docker-destructive-guardrails.

References

  • references/project-structure.md — Detailed guidance on Docker project file organization, naming conventions, and multi-service layouts.

Assets

  • assets/dockerignore-example — A comprehensive .dockerignore for a typical project.
  • assets/compose-dev.yaml — A development-oriented Compose file with Dockerized dependencies.
  • assets/Dockerfile.simple — A basic multi-stage Dockerfile following best practices.

Scripts

  • scripts/verify-setup.sh — Checks that required files exist in the current directory and validates its compose.yaml. Run it from the project root, with the script path resolved under this skill's directory:
    bash
    bash "<skill-dir>/scripts/verify-setup.sh" [--help]
    Replace <skill-dir> with the absolute path of the folder that contains this SKILL.md; the scripts/ path is relative to that folder, not to the project. Do not change into the skill directory first: the script checks the current directory. If the skill directory cannot be resolved, check that .dockerignore, Dockerfile, and compose.yaml exist in the project root, then run docker compose config --quiet. Exit status is 0 when verification succeeds or help is requested, 1 when required files are missing or the Compose configuration is invalid, and 2 for invalid arguments.

Checks

  • checks/verification.md — Detailed verification checklist for manual review.

© docker, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (scripts, references, assets) in skills/docker-project-foundations of docker/skills.

  • SKILL.md
  • agents/openai.yaml
  • assets/Dockerfile.simple
  • assets/compose-dev.yaml
  • assets/dockerignore-example
  • checks/verification.md
  • references/project-structure.md
  • scripts/verify-setup.sh
  • skill.yaml

Open the folder on GitHubat commit f791727

Compare with similar skills

Docker Project Foundations next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Docker Project Foundations compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Docker Project Foundations this skilldocker/skills539—~1.9kAutomated safety check: WarnApache-2.0
Reflexo ReleaseMyriad-Dreamin/typst.ts1.2k—~1.5kAutomated safety check: PassApache-2.0
Os Eco Dep Syncjayminwest/warren473—~1.9kAutomated safety check: PassMIT
Ddevhaxtheweb/haxcms-php130—~1.6kAutomated safety check: PassApache-2.0
Data Processingaiskillstore/marketplace4301 repos~720Automated safety check: NotesMIT
Tokf Runmpecan/tokf199—~571Automated safety check: PassMIT

Similar skills

  • Reflexo Release

    Myriad-Dreamin/typst.ts

    Guide Reflexo/typst.ts release preparation and operator handoffs.

    1.2k GitHub stars~1.5k tokensUpdated 13 days ago
    DevOps & CloudAuto-check passed
  • Os Eco Dep Sync

    jayminwest/warren

    Bump warren onto the latest published @os-eco/ versions across package.json + bun.lock and the Dockerfile CLI pins, then run the gates and open a PR.

    473 GitHub stars~1.9k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Ddev

    haxtheweb/haxcms-php

    DDEV local development environment guidance for Docker-based PHP/Node projects.

    130 GitHub stars~1.6k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Data Processing

    aiskillstore/marketplace

    Process JSON with jq and YAML/TOML with yq. An agent skill from aiskillstore/marketplace.

    430 GitHub starsUsed in 1 repo~720 tokens
    DevOps & CloudAuto-check: notes
  • Tokf Run

    mpecan/tokf

    Compress verbose CLI output with tokf before returning results.

    199 GitHub stars~571 tokensUpdated 5 days ago
    DevOps & CloudAuto-check passed
  • Verify Version Alignment

    Luligu/matterbridge

    Verify that package, Docker build, test utility helper, docs update JSON files, and Docker workflow tags match the expected root version rules.

    983 GitHub stars~1.7k tokensUpdated today
    DevOps & CloudAuto-check passed

More from docker/skills

All 11 skills in this repo
  • Official

    A skill your agent uses when creating, modifying, or debugging Docker Compose configurations, even if the user just says they need to wire services together, add a database to their stack, or set up…

    539 GitHub stars~2.4k tokensUpdated 3 days ago
    Auto-check: notes
  • Official

    A skill your agent uses when writing, reviewing, or optimizing Dockerfiles, even if the user just says their image is too large, their build is slow, or they need to harden a container for production.

    539 GitHub stars~3k tokensUpdated 3 days ago
    Auto-check: warnings
  • Docker Agent Config

    docker/skills

    Official

    A skill your agent uses when creating or editing an agent.yaml (or .yml/.hcl) configuration file for Docker Agent (cagent), including defining agents, models/providers, built-in or MCP toolsets…

    539 GitHub stars~2.5k tokensUpdated 3 days ago
    Auto-check: notes
  • Docker Agent Deploy

    docker/skills

    Official

    A skill your agent uses when exposing a Docker Agent as a server (MCP, HTTP API, A2A, ACP, or OpenAI-compatible chat), distributing an agent via an OCI registry with docker agent share, or measuring…

    539 GitHub stars~1.9k tokensUpdated 3 days ago
    Auto-check passed
  • Official

    A skill your agent uses when authoring, planning, or running a declarative sbxenv.yaml file for Docker Sandboxes (sbx env create/run/plan/exec/rm), even if the user just says they want to "check in…

    539 GitHub stars~4k tokensUpdated 3 days ago
    Auto-check passed
  • Official

    A skill your agent uses when authoring, validating, packaging, signing, or composing a Docker Sandboxes kit spec.yaml (sbx kit add/inspect/pack/pull/push/sign/validate/verify), even if the user just…

    539 GitHub stars~4.2k tokensUpdated 3 days ago
    Auto-check passed

Works with

Categories

Questions about Docker Project Foundations

What does Docker Project Foundations do?

A skill your agent uses when setting up, initializing, or Dockerizing a project, even if the user doesn't explicitly mention Docker but describes a need for containerized local development, adding a…. Docker Project Foundations is an agent skill from docker/skills, published by the product's own GitHub organization. Use this skill when setting up, initializing, or Dockerizing a project, even if the user doesn't explicitly mention Docker but describes a need for containerized local development, adding a database or cache dependency, or running services without host-level installs.

When should I use Docker Project Foundations?

Docker Project Foundations fits situations like: dockerizing a project; even if the user doesnt explicitly mention Docker but describes a need for containerized local development; adding a database; cache dependency.

How do I install Docker Project Foundations in Claude Code?

Run `npx skills add docker/skills --skill docker-project-foundations -a claude-code`. Or copy the skill folder (skills/docker-project-foundations in docker/skills) into .claude/skills/docker-project-foundations in your project. Claude Code loads it when a task matches its description.

How do I install Docker Project Foundations in Codex?

Run `npx skills add docker/skills --skill docker-project-foundations -a codex`. Or copy the skill folder (skills/docker-project-foundations in docker/skills) into .agents/skills/docker-project-foundations in your project. Codex loads it when a task matches its description.

Can I use Docker Project Foundations in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add docker/skills --skill docker-project-foundations -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/docker-project-foundations, .gemini/skills/docker-project-foundations, .github/skills/docker-project-foundations and .opencode/skills/docker-project-foundations in your project.

What does Docker Project Foundations need to run?

Going by SKILL.md and its folder, Docker Project Foundations needs a shell for the scripts in its folder and the command-line tools its instructions call (docker, bash, npm, brew and apt). Our summary lists: Node.js; A Bash shell; Docker. Compatibility (from SKILL.md): Requires Docker 20.10+ and Docker Compose v2..

Does Docker Project Foundations access the network?

SKILL.md contains no URLs. Its commands use docker and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Docker Project Foundations safe to install?

Our automated static check of SKILL.md flagged 3 warning(s): mentions a credentials file (ssh keys, cloud or package-manager tokens). Read the flagged lines before installing; the check is not a guarantee either way. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Docker Project Foundations use?

Docker Project Foundations is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Docker Project Foundations use?

About 1.9k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 834 tokens, read only when the agent opens those files.

What are the alternatives to Docker Project Foundations?

Skills that share tags, products or a category with Docker Project Foundations: Reflexo Release (Myriad-Dreamin/typst.ts, 1.2k stars), Os Eco Dep Sync (jayminwest/warren, 473 stars), Ddev (haxtheweb/haxcms-php, 130 stars) and Data Processing (aiskillstore/marketplace, 430 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Docker Project Foundations?

docker (a GitHub organization, an official publisher) maintains it in docker/skills, which has 539 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 4, 2026.

Source: docker/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.