configure-dockerfile
БесплатноБез исполняемых скриптовНе проверенDockerfile standards: Alpine/slim base, non-root user, multi-stage builds. Use when creating a Dockerfile, hardening security, or auditing image size.
от laurigates★ 61 звезда на GitHubОб этом скилле
/configure:dockerfile
Check and configure Dockerfile against project standards with emphasis on minimal images, non-root users, and multi-stage builds.
When to Use This Skill
| Use this skill when... | Use another approach when... |
|---|---|
| Checking Dockerfile compliance with standards | Just viewing Dockerfile (use Read tool) |
| Creating Dockerfile from template | Dockerfile already follows all standards |
| Validating image size, security, multi-stage builds | Need container runtime config (use /configure:container) |
| Setting up minimal Alpine/slim-based images | Project uses specialized base images (custom requirements) |
| Ensuring non-root user configuration | Debugging container issues (check logs, inspect runtime) |
Context
- Dockerfiles: !
find . -maxdepth 1 \( -name 'Dockerfile' -o -name 'Dockerfile.*' -o -name '*.Dockerfile' \) - Dockerignore: !
find . -maxdepth 1 -name '.dockerignore' - Project type: !
find . -maxdepth 1 \( -name 'package.json' -o -name 'pyproject.toml' -o -name 'Cargo.toml' -o -name 'go.mod' \) -print -quit - Base images: !
find . -maxdepth 1 \( -name 'Dockerfile' -o -name 'Dockerfile.*' -o -name '*.Dockerfile' \) -exec grep -hm5 '^FROM' {} +
Parameters
Parse from command arguments:
--check-only: Report compliance status without modifications--fix: Apply fixes automatically without prompting--type <type>: Override project type detection (frontend, python, go, rust)
Execution
Execute this Dockerfile compliance check:
Step 1: Detect project type and Dockerfiles
- Find Dockerfile(s) in project root
- Detect project type from context (package.json, pyproject.toml, go.mod, Cargo.toml)
- Parse Dockerfile to analyze current configuration
- Apply
--typeoverride if provided
Step 2: Verify latest base image versions
Before flagging outdated base images, use WebSearch or WebFetch to verify latest versions:
- Node.js Alpine: Check Docker Hub for latest LTS Alpine tags
- Python slim: Check Docker Hub for latest slim tags
- nginx Alpine: Check Docker Hub for latest Alpine tags
- Go Alpine: Check Docker Hub for latest Alpine tags
- Rust Alpine: Check Docker Hub for latest Alpine tags
Step 3: Analyze compliance
Check the Dockerfile against these standards:
Frontend (Node.js) Standards:
| Check | Standard | Severity |
|---|---|---|
| Build base | node:24-alpine (LTS) |
WARN if other |
| Runtime base | nginx:1.30-alpine |
WARN if other |
| Multi-stage | Required | FAIL if missing |
| HEALTHCHECK | Required | FAIL if missing |
| Non-root user | Required | FAIL if missing |
| Build caching | --mount=type=cache recommended |
INFO |
| OCI Labels | Required for GHCR integration | WARN if missing |
Python Service Standards:
| Check | Standard | Severity |
|---|---|---|
| Base image | python:3.14-slim |
WARN if other |
| Multi-stage | Required for production | FAIL if missing |
| HEALTHCHECK | Required | FAIL if missing |
| Non-root user | Required | FAIL if missing |
| OCI Labels | Required for GHCR integration | WARN if missing |
OCI Container Labels:
| Label | Purpose | Severity |
|---|---|---|
org.opencontainers.image.source |
Links to repository | WARN if missing |
org.opencontainers.image.description |
Package description | WARN if missing |
org.opencontainers.image.licenses |
SPDX license identifier | WARN if missing |
org.opencontainers.image.version |
Semantic version (via ARG) | INFO if missing |
org.opencontainers.image.revision |
Git commit SHA (via ARG) | INFO if missing |
Step 4: Report results
Print a compliance report:
Dockerfile Compliance Report
================================
Project Type: <type> (detected)
Dockerfile: ./Dockerfile (found)
Configuration Checks:
Build base <image> [PASS|WARN]
Runtime base <image> [PASS|WARN]
Multi-stage <N> stages [PASS|FAIL]
HEALTHCHECK <present|missing> [PASS|FAIL]
Non-root user <present|missing> [PASS|FAIL]
Build caching <enabled|missing> [PASS|INFO]
OCI Labels Checks:
image.source <present|missing> [PASS|WARN]
image.description <present|missing> [PASS|WARN]
image.licenses <present|missing> [PASS|WARN]
Recommendations:
<list specific fixes needed>
If --check-only, stop here.
Step 5: Apply fixes (if requested)
If --fix flag is set or user confirms:
- Missing Dockerfile: Create from standard template (see Standard Templates below)
- Missing HEALTHCHECK: Add standard healthcheck
- Missing multi-stage: Suggest restructure (manual fix needed)
- Outdated base images: Update FROM lines
- Missing OCI labels: Add LABEL instructions
Step 6: Update standards tracking
Update .project-standards.yaml:
components:
dockerfile: "2025.1"
Standard Templa
Установить configure-dockerfile в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
GlobGrepReadWriteEditAskUserQuestionTodoWriteWebSearchWebFetchFAQ
Что делает скилл configure-dockerfile?
Dockerfile standards: Alpine/slim base, non-root user, multi-stage builds. Use when creating a Dockerfile, hardening security, or auditing image size.
Как установить скилл configure-dockerfile?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл configure-dockerfile запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic