본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)48k · #4476

docker-management

하는 일

이 도구는 Docker 컨테이너와 이미지를 만들고, 최적화하고, 문제를 고치는 데 도움을 줍니다. 컨테이너 안에서 애플리케이션을 만들고, 실행하고, 관리할 수 있게 합니다.

사용하는 경우

  • ✓컨테이너에서 애플리케이션이 어떻게 실행될지 정의하는 파일(Dockerfile)을 만들 때.
  • ✓애플리케이션을 위한 Docker 이미지를 빌드하고 이름을 붙일 때.
  • ✓컨테이너 안의 애플리케이션을 실행, 중지, 디버그할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/docker-management/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/docker-management/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 웹 애플리케이션을 위한 Docker 이미지를 어떻게 만들 수 있을까요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

애플리케이션을 위한 지침 파일(Dockerfile)을 만들어 달라고 요청하고, 그것으로 이미지를 빌드한 뒤, 그 이미지를 컨테이너로 실행할 수 있습니다. 도구는 발생할 수 있는 문제를 해결하는 데도 도움을 줍니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Docker Management

Build, run, and manage Docker containers for application deployment and development.

When to Use This Skill

Use this skill when:

  • Creating and optimizing Dockerfiles
  • Building and tagging Docker images
  • Running and managing containers
  • Debugging container issues
  • Configuring Docker networking and volumes
  • Implementing container security best practices

Execution Scope

Confirm the selected Docker context and project before any operation. Build instructions execute contributed commands; inspect the Dockerfile, build context, scripts and downloaded dependencies first. Image publication, shared-container stops and volume deletion need authorization for the exact target. Do not expose environment values, image history or logs containing credentials. These examples are independent fragments with project-specific assets, not a complete deployment.

Prerequisites

  • Docker Engine installed (20.10+)
  • Basic command line knowledge
  • Understanding of application deployment

Dockerfile Best Practices

Multi-Stage Build

# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build && npm prune --omit=dev

# Production stage
FROM node:20-alpine AS production
WORKDIR /app
RUN addgroup -g 1001 -S nodejs && \
    adduser -S nodejs -u 1001 -G nodejs
COPY --from=builder --chown=nodejs:nodejs /app/dist ./dist
COPY --from=builder --chown=nodejs:nodejs /app/node_modules ./node_modules
USER nodejs
EXPOSE 3000
CMD ["node", "dist/index.js"]

Layer Optimization

FROM python:3.12-slim

# Install dependencies first (cached unless requirements change)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy application code (changes frequently)
COPY . .

CMD ["python", "app.py"]

Security Hardening

FROM node:20-alpine

# Create non-root user
RUN addgroup -g 1001 appgroup && \
    adduser -u 1001 -G appgroup -D appuser

WORKDIR /app

# Copy with proper ownership
COPY --chown=appuser:appgroup . .

# Drop privileges
USER appuser

# Use exec form for proper signal handling
CMD ["node", "server.js"]

Building Images

Basic Build

# Build with tag
docker build -t myapp:1.0 .

# Build with build args
docker build --build-arg NODE_ENV=production -t myapp:prod .

# Build for specific platform
docker build --platform linux/amd64 -t myapp:amd64 .

# Build with no cache
docker build --no-cache -t myapp:fresh .

Multi-Platform Builds

# Create builder
docker buildx create --name multiplatform --use

# Build for multiple architectures
docker buildx build \
  --platform linux/amd64,linux/arm64 \
  -t myregistry/myapp:latest \
  --push .

Running Containers

Basic Operations

# Run container
docker run -d --name myapp -p 8080:3000 myapp:latest

# Run with environment variables
docker run -d \
  -e DATABASE_URL=postgres://localhost/db \
  -e NODE_ENV=production \
  myapp:latest

# Run with resource limits
docker run -d \
  --memory="512m" \
  --cpus="1.0" \
  myapp:latest

# Run with restart policy
docker run -d --restart=unless-stopped myapp:latest

Volume Management

# Named volume
docker volume create mydata
docker run -v mydata:/app/data myapp:latest

# Bind mount
docker run -v "$(pwd)/config:/app/config:ro" myapp:latest

# tmpfs mount (memory)
docker run --tmpfs /tmp:rw,noexec,nosuid myapp:latest

Networking

# Create network
docker network create mynetwork

# Run on network
docker run -d --network mynetwork --name api myapp:latest

# Connect existing container
docker network connect mynetwork existing-container

# Expose specific ports
docker run -d -p 127.0.0.1:8080:3000 myapp:latest

Container Lifecycle

Management Commands

# List containers
docker ps -a

# Stop container
docker stop myapp

# Remove container
docker rm myapp

# Force remove running container
docker rm -f myapp

# Prune stopped containers
docker container prune -f

Logs and Monitoring

# View logs
docker logs myapp

# Follow logs
docker logs -f --tail 100 myapp

# View resource usage
docker stats myapp

# Inspect container
docker inspect myapp

Debugging Containers

Interactive Access

# Execute command in running container
docker exec -it myapp /bin/sh

# Run container with shell
docker run -it --rm myapp:latest /bin/sh

# Debug failed container

…
자주 묻는 질문

Docker 컨테이너란 무엇인가요?

애플리케이션이 실행하는 데 필요한 모든 것(코드, 라이브러리, 도구)을 담은 독립된 상자와 같습니다. 어떤 컴퓨터에서든 같은 방식으로 작동하도록 보장합니다.

Dockerfile이란 무엇인가요?

Docker가 이미지를 빌드할 때 따르는 단계별 지침이 적힌 텍스트 파일입니다. 이미지 안에서 환경과 애플리케이션 설정 방법을 정의합니다.

Docker를 사용하려면 코딩을 알아야 하나요?

기본적인 명령줄 지식과 애플리케이션이 어떻게 작동하는지 이해하면 도움이 됩니다. 도구가 구체적인 Docker 명령을 도와줍니다.

상세 정보

작성자의 원본 설명

Build, optimize, and troubleshoot Docker containers and images.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4476
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬