skills/docker/SKILL.md
Docker 및 컨테이너 설정을 위한 가이드를 실행합니다.
npx skillsauth add excatt/superclaude-plusplus dockerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Docker 및 컨테이너 설정을 위한 가이드를 실행합니다.
# docker-compose.yml (v2 - version 키 불필요)
services:
app:
build:
context: .
dockerfile: Dockerfile
target: production
ports:
- "3000:3000"
environment:
- NODE_ENV=production
depends_on:
db:
condition: service_healthy
restart: true
develop: # NEW: Watch mode
watch:
- action: sync
path: ./src
target: /app/src
- action: rebuild
path: package.json
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
restart: unless-stopped
networks:
- app-network
db:
image: postgres:16-alpine
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: mydb
POSTGRES_USER: user
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d mydb"]
interval: 10s
timeout: 5s
retries: 5
networks:
- app-network
volumes:
postgres_data:
networks:
app-network:
driver: bridge
secrets:
db_password:
file: ./secrets/db_password.txt
# 파일 변경 자동 감지 및 동기화
docker compose watch
# 또는 백그라운드
docker compose up --watch
# ===== Node.js =====
FROM node:22-alpine AS base
WORKDIR /app
# Dependencies
FROM base AS deps
COPY package*.json ./
RUN npm ci --only=production
# Build
FROM base AS builder
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Production
FROM base AS production
COPY --from=deps /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
USER node
EXPOSE 3000
CMD ["node", "dist/server.js"]
# ===== Bun (대안) =====
FROM oven/bun:1 AS bun-base
WORKDIR /app
COPY package.json bun.lockb ./
RUN bun install --frozen-lockfile --production
COPY . .
USER bun
EXPOSE 3000
CMD ["bun", "run", "start"]
# ===== Python with uv (2024 최신) =====
FROM python:3.12-slim AS base
WORKDIR /app
# uv 설치
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
# Dependencies
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev
# Production
COPY . .
USER nobody
EXPOSE 8000
CMD ["uv", "run", "gunicorn", "-b", "0.0.0.0:8000", "app:app"]
# ===== 전통적 pip 방식 =====
FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
USER nobody
EXPOSE 8000
CMD ["gunicorn", "-b", "0.0.0.0:8000", "app:app"]
FROM golang:1.22-alpine AS builder
WORKDIR /app
COPY go.* ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o main .
FROM scratch
COPY --from=builder /app/main /main
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
EXPOSE 8080
ENTRYPOINT ["/main"]
FROM rust:1.75-alpine AS builder
WORKDIR /app
RUN apk add --no-cache musl-dev
COPY Cargo.toml Cargo.lock ./
COPY src ./src
RUN cargo build --release
FROM scratch
COPY --from=builder /app/target/release/app /app
EXPOSE 8080
ENTRYPOINT ["/app"]
--no-cache 플래그 사용# npm 캐시
RUN --mount=type=cache,target=/root/.npm \
npm ci --only=production
# pip 캐시
RUN --mount=type=cache,target=/root/.cache/pip \
pip install -r requirements.txt
# Go 모듈 캐시
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download
node_modules
npm-debug.log
.git
.gitignore
.env*
*.md
!README.md
Dockerfile*
docker-compose*.yml
.dockerignore
coverage
.nyc_output
dist
build
*.log
.DS_Store
docker build -t name:tag .
docker build --target production -t name:prod .
docker images
docker image prune -a
docker buildx build --platform linux/amd64,linux/arm64 -t name:tag .
docker run -d -p 3000:3000 --name app image
docker ps -a
docker logs -f --tail 100 <container>
docker exec -it <container> sh
docker stats
docker top <container>
docker compose up -d
docker compose up --watch # 개발 모드
docker compose down -v # 볼륨 포함 삭제
docker compose logs -f app
docker compose exec app sh
docker compose ps
docker compose config # 설정 검증
docker compose pull # 이미지 업데이트
docker system prune -a --volumes
docker builder prune # BuildKit 캐시 정리
# docker-compose.prod.yml
services:
app:
image: myapp:${VERSION:-latest}
deploy:
replicas: 2
resources:
limits:
cpus: '1'
memory: 1G
reservations:
cpus: '0.5'
memory: 512M
restart_policy:
condition: on-failure
max_attempts: 3
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
## Docker Configuration
### Dockerfile
```dockerfile
# 최적화된 Dockerfile
# 서비스 구성
# 빌드 및 실행 명령어
---
요청에 맞는 Docker 설정을 생성하세요.
testing
사용자 계획을 기존 도메인 모델에 대해 stress-test하는 인터뷰 세션. 용어를 날카롭게 다듬고, 결정이 굳어질 때마다 CONTEXT.md(도메인 어휘 사전)와 ADR을 인라인으로 갱신한다. 새 기능 요구사항 탐색은 `/brainstorm`을, 기존 도메인 모델·용어와의 정합성 점검은 이 스킬을 사용한다.
development
# Excel (XLSX) Spreadsheet Skill Claude Code supports comprehensive spreadsheet operations through the **xlsx** skill, enabling creation, editing, and analysis of Excel files (.xlsx, .xlsm, .csv, .tsv). ## Trigger - When user needs Excel spreadsheet creation or editing - Financial modeling or data analysis required - Spreadsheet formulas and calculations needed - Data import from CSV/TSV files ## Core Capabilities **Primary functions include:** - Creating new spreadsheets with formulas and f
tools
Generate structured implementation workflows from PRDs and feature requirements
development
실시간 통신 설계 가이드를 실행합니다.