スキル一覧に戻る
kprsnt2

docker

by kprsnt2

0🍴 0📅 2026年1月15日
GitHubで見るManusで実行

SKILL.md


name: docker description: Docker and containerization best practices including multi-stage builds, security, and Docker Compose. globs: ["/Dockerfile", "/docker-compose.yml", "/docker-compose.yaml", "/.dockerignore"] priority: 80 tags: ["devops"]

Docker Best Practices

Dockerfile

  • Use specific base image tags (not :latest)
  • Use multi-stage builds for smaller images
  • Minimize layers (combine RUN commands)
  • Copy package.json first for caching
  • Run as non-root user
  • Use .dockerignore

Example Multi-stage Build

FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM node:20-alpine AS runner
WORKDIR /app
RUN addgroup -g 1001 nodejs
RUN adduser -S nodejs -u 1001
COPY --from=builder /app/dist ./dist
USER nodejs
CMD ["node", "dist/index.js"]

Docker Compose

  • Use version 3.8+
  • Define healthchecks
  • Use named volumes for persistence
  • Configure restart policies
  • Use environment files

Security

  • Scan images for vulnerabilities
  • Don't run as root
  • Use secrets for sensitive data
  • Keep base images updated
  • Use distroless/alpine images

Performance

  • Use BuildKit
  • Leverage layer caching
  • Use .dockerignore
  • Minimize image size

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です