- name
SKILL.md
스킬 파일은 게시자의 저장소에 그대로 있습니다.
복사한 명령을 터미널에 붙여넣습니다. 이 SKILL.md가 해당 에이전트에 설치됩니다.
npx skills add docker/skills --skill docker-project-foundations -a cursor -y복사한 명령을 터미널에 붙여넣습니다. 이 SKILL.md가 해당 에이전트에 설치됩니다.
npx skills add docker/skills --skill docker-project-foundations -a claude-code -y복사한 명령을 터미널에 붙여넣습니다. 이 SKILL.md가 해당 에이전트에 설치됩니다.
npx skills add docker/skills --skill docker-project-foundations -a codex -y복사한 명령을 터미널에 붙여넣습니다. 이 SKILL.md가 해당 에이전트에 설치됩니다.
npx skills add docker/skills --skill docker-project-foundations -a grok -y복사한 메시지를 Grok Bot 채팅에 보냅니다. Bot이 GitHub에서 이 SKILL.md를 가져와 모든 Bot이 공유하는 스킬에 추가합니다.
Install this skill: https://github.com/docker/skills/tree/HEAD/skills/docker-project-foundations게시자 제공
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.
Activate this skill when:
Dockerfile, compose.yaml, or .dockerignore and does not have oneDo not use this skill when:
DockerfileWhen Dockerizing a project, always produce all three:
.dockerignore — Create this first so the initial build context is small and safe. See assets/dockerignore-example for a reference.Dockerfile — Create a working starter image definition that the project can build and run with. Start from assets/Dockerfile.simple and keep its baseline, even for a first scaffold:
node:22-slim), never latest;package.json + lockfile) copied before the source for layer caching;USER set in the final stage before CMD/ENTRYPOINT.compose.yaml — Create a local development stack that includes the application service and any required dependencies. See assets/compose-dev.yaml..npmrc at every depth with **/.npmrc in .dockerignore; otherwise a broad source copy can persist credentials in image layers.npmrc as a BuildKit secret for both npm ci steps. Public-package builds need no secret. For private registries, pass the config explicitly:
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.compose.npm.yaml alongside the starter's compose.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.When a project needs a database (Postgres, MySQL, MongoDB), cache (Redis, Memcached), queue (RabbitMQ, Kafka), or any other infrastructure service:
compose.yaml instead of telling the user to install it on the host.brew install postgres, apt install redis, or similar host-level installs for development dependencies.compose.yaml rather than legacy Compose filenames.docker/ subdirectory..env override.USER).Dockerfile that supports both via build stages and build arguments when possible.Dockerfile at the project root (or in a docker/ subdirectory if the project has multiple services).compose.yaml at the project root..dockerignore at the project root, next to the Dockerfile.docker-build-strategies. The starter baseline above (including a non-root USER) still applies here.docker-compose-patterns.docker system prune, docker rm -f, image/network/builder pruning) and a cross-product index of destructive-command guardrails, use docker-destructive-guardrails.references/project-structure.md — Detailed guidance on Docker project file organization, naming conventions, and multi-service layouts.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/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 "<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/verification.md — Detailed verification checklist for manual review.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 o
---name: docker-project-foundationsdescription: Use this skill when setting up, initializing, or Dockerizing a project, even if the user doesn't explicitly…---# skills/docker-project-foundations/SKILL.md개요
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.
FAQ
게시자에게서 skills/docker-project-foundations/SKILL.md를 다운로드하거나 경로를 복사해 저장소를 엽니다. PlugMCP는 스킬을 목록에 올릴 뿐 파일을 호스팅하지 않습니다.
게시자가 https://github.com/docker/skills에서 관리합니다.
Claude, Cursor, Codex, Grok Build는 게시자의 저장소에서 추가한 SKILL.md를 읽을 수 있습니다. Grok Bot은 채팅에서 스킬의 GitHub 폴더 링크를 보내면 설치합니다.