Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

docker

БесплатноБез исполняемых скриптовНе проверен

Production-grade Docker containerization for Python and Node.js applications. This skill should be used when users ask to containerize applications, create…

mjunaidcaот mjunaidca★ 27 звёзд на GitHub

Об этом скилле

Docker

Production-grade Docker containerization with security-first defaults.


Resource Detection & Adaptation

Before generating Dockerfiles/Compose, detect the environment:

# Detect host machine memory
sysctl -n hw.memsize 2>/dev/null | awk '{print $0/1024/1024/1024 " GB"}' || \
  grep MemTotal /proc/meminfo | awk '{print $2/1024/1024 " GB"}'

# Detect Docker allocated resources
docker info --format 'Memory: {{.MemTotal}}, CPUs: {{.NCPU}}'

# Detect available disk space
docker system df

Adapt configurations based on detection:

Detected Docker Memory Profile Build Memory Container Limits
< 4GB Constrained 1GB 256Mi
4-8GB Minimal 2GB 512Mi
8-12GB Standard 4GB 1Gi
> 12GB Extended 8GB 2Gi

Agent Behavior

  1. Detect Docker resources before generating compose.yaml
  2. Adapt resource limits to available memory
  3. Warn if build may fail due to insufficient resources
  4. Calculate safe limits: docker_memory * 0.6 / container_count

Adaptive Compose Templates

Constrained (< 4GB Docker):

services:
  app:
    deploy:
      resources:
        limits:
          memory: 256M
          cpus: '0.25'
    build:
      args:
        - BUILDKIT_STEP_LOG_MAX_SIZE=10000000

⚠️ Agent should warn: "Docker memory low. Multi-stage builds may fail."

Standard (4-8GB Docker):

services:
  app:
    deploy:
      resources:
        limits:
          memory: 512M
          cpus: '0.5'
        reservations:
          memory: 256M

Extended (> 8GB Docker):

services:
  app:
    deploy:
      resources:
        limits:
          memory: 1G
          cpus: '1.0'
        reservations:
          memory: 512M

Pre-Build Validation

Before running docker build, agent should verify:

# Check available memory
docker info --format '{{.MemTotal}}' | awk '{if ($1 < 4000000000) print "WARNING: Low memory"}'

If constrained: use --memory flag and warn user about potential build failures.


What This Skill Does

Analysis & Detection:

  • Auto-detects runtime, framework, version, entrypoint (no questions)
  • Scans .env files, classifies secrets vs build-args vs runtime config
  • Detects native dependencies, generates correct build deps
  • Identifies missing configs (Next.js standalone, health endpoints)

Generation:

  • Creates multi-stage Dockerfiles customized to YOUR project structure
  • Generates compose.yaml with security defaults (non-root, read-only, resource limits)
  • Adds health endpoints if missing
  • Fixes configuration issues (adds output: 'standalone' to Next.js, etc.)

Validation:

  • Builds both dev and production targets before delivering
  • Verifies health endpoints work
  • Confirms non-root user in production
  • Warns about any secrets that would leak into image
  • Reports image size

Security:

  • Never bakes secrets into images
  • Non-root user by default
  • Minimal attack surface (multi-stage builds)
  • Pinned versions (no :latest)
  • Security scan command included

What This Skill Does NOT Do

  • Generate Kubernetes manifests (use dedicated k8s skill)
  • Create Helm charts (use dedicated helm skill)
  • Handle Bun/Deno (use dedicated skills)
  • Copy templates blindly without customization

Before Implementation

Gather context to ensure successful implementation:

Source Gather
Codebase Package files, existing Dockerfile, .env patterns
Conversation Dev vs production target, base image preferences
Skill References Framework patterns, multi-stage builds, security
User Guidelines Registry conventions, naming standards

Required Clarifications

Ask when not auto-detectable:

Question When to Ask
Target environment "Building for development or production?"
Base image preference "Standard slim images or enterprise hardened?"
Existing Docker files "Enhance existing Dockerfile or create new?"
Registry target "Local only or pushing to registry?"

Detect Runtime

File Present Runtime Package Manager
requirements.txt, pyproject.toml, uv.lock Python pip/uv
pnpm-lock.yaml Node.js pnpm
yarn.lock Node.js yarn
package-lock.json Node.js npm

Auto-Detection (Do NOT ask - detect from files)

Python

What Detect From
Python version pyproject.toml (requires-python), .python-version, runtime.txt
Framework Imports in code (from fastapi, from flask, import django)
Package manager uv.lock → uv, poetry.lock → poetry, else pip
Native deps Scan requirements: psycopg2, cryptography, numpy, pillow
App entrypoint Find app = FastAPI(), app = Flask(), or manage.py

Node.js

| What

Полный SKILL.md на GitHub

Установить docker в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

Makefilereferences/docker-hardened-images.mdreferences/env-analysis.mdreferences/multi-stage-builds.mdreferences/node/nextjs.mdreferences/node/package-managers.mdreferences/production-checklist.mdreferences/python/django.mdreferences/python/fastapi.mdreferences/python/flask.mdreferences/python/native-deps.mdtemplates/node/Dockerfiletemplates/node/compose.yamltemplates/node/dockerignoretemplates/python/Dockerfiletemplates/python/compose.yamltemplates/python/dockerignore

FAQ

Что делает скилл docker?

Production-grade Docker containerization for Python and Node.js applications. This skill should be used when users ask to containerize applications, create Dockerfiles, dockerize projects, or set up Docker Compose. Auto-detects project structure, analyzes .env for secrets, validates security, and generates tested Dockerfiles.

Как установить скилл docker?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл docker запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить docker с