# Docker Project Foundations

Use this skill when setting up, initializing, or Dockerizing a project, even if the...

- Repository: https://github.com/docker/skills (609 stars)
- Category: Data and ML
- License: Apache-2.0
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add docker/skills --skill docker-project-foundations -g -a claude-code -y`
Codex: `npx skills add docker/skills --skill docker-project-foundations -g -a codex -y`
Cursor: `npx skills add docker/skills --skill docker-project-foundations -g -a cursor -y`
Gemini CLI: `npx skills add docker/skills --skill docker-project-foundations -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add docker/skills`

## 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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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

The rest: https://github.com/docker/skills/blob/HEAD/skills/docker-project-foundations/SKILL.md
