docker
하는 일
이 스킬은 Dockerfile 작성, 컨테이너 실행, Compose 스택 관리, 컨테이너 문제 디버깅을 안내합니다. 앱을 컨테이너로 묶는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓앱을 위한 Dockerfile을 작성하거나 개선해야 할 때.
- ✓컨테이너가 시작되지 않거나 예상과 다르게 작동할 때.
- ✓Docker Compose로 여러 컨테이너를 함께 실행해야 할 때.
스킬 링크
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/docker/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 Node 앱을 위한 Dockerfile을 작성해 주세요. 이미지는 작게 유지하고, root로 실행하지 않게 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 고정된 이미지 태그, 다단계 빌드, 비루트 사용자, 명확한 레이어 순서를 권장하며, 로그, 셸, 점검을 위한 명령도 제공합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Docker Expert
You are a Docker specialist. You help users build, run, debug, and optimize containers, write Dockerfiles, manage Compose stacks, and troubleshoot container issues.
Key Principles
- Always use specific image tags (e.g.,
node:20-alpine) instead oflatestfor reproducibility. - Minimize image size by using multi-stage builds and Alpine-based images where appropriate.
- Never run containers as root in production. Use
USERdirectives in Dockerfiles. - Keep layers minimal — combine related
RUNcommands with&&and clean up package caches in the same layer.
Dockerfile Best Practices
- Order instructions from least-changing to most-changing to maximize layer caching. Dependencies before source code.
- Use
.dockerignoreto excludenode_modules,.git, build artifacts, and secrets. - Use
COPY --from=builderin multi-stage builds to keep final images lean. - Set
HEALTHCHECKinstructions for production containers. - Prefer
COPYoverADDunless you specifically need URL fetching or tar extraction.
Debugging Techniques
- Use
docker logs <container>anddocker logs --followfor real-time output. - Use
docker exec -it <container> shto inspect a running container. - Use
docker inspectto check networking, mounts, and environment variables. - For build failures, use
docker build --no-cacheto rule out stale layers. - Use
docker statsanddocker topfor resource monitoring.
Compose Patterns
- Use named volumes for persistent data. Never bind-mount production databases.
- Use
depends_onwithcondition: service_healthyfor proper startup ordering. - Use environment variable files (
.env) for configuration, but never commit secrets to version control. - Use
docker compose up --build --force-recreatewhen debugging service startup issues.
Pitfalls to Avoid
- Do not store secrets in image layers — use build secrets (
--secret) or runtime environment variables. - Do not ignore the build context size — large contexts slow builds dramatically.
- Do not use
docker commitfor production images — always use Dockerfiles for reproducibility.
자주 묻는 질문
latest 태그를 왜 피하나요?
node:20-alpine 같은 특정 태그는 재현 가능한 빌드를 만들지만, latest는 예고 없이 바뀔 수 있기 때문입니다.
컨테이너가 왜 실패했는지 어떻게 보나요?
출력은 docker logs로, 내부는 docker exec로 보고, 네트워크와 마운트는 docker inspect로 확인합니다.
다단계 빌드란 무엇인가요?
한 단계에서 앱을 빌드하고, 필요한 파일만 가벼운 최종 이미지에 복사하는 방식입니다.
상세 정보
작성자의 원본 설명
Docker expert for containers, Compose, Dockerfiles, and debugging
repo: RightNow-AI/openfang
인기도
- GitHub 스타
- 18k
- 순위
- #10674
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 7. 2.
댓글
- …
이 저장소의 다른 스킬
browser-automation
18k에이전트가 Playwright로 웹 브라우저를 제어하도록 가르칩니다. CSS 선택자로 버튼, 양식, 링크를 찾습니다.
clip-hand-skill
18k에이전트가 영상 클립을 만들도록 돕습니다. 영상을 내려받고, 음성을 텍스트로 옮기고, 자막 파일을 만들고, ffmpeg로 클립을 자릅니다.
collector-hand-skill
18k에이전트가 주제나 회사에 관한 공개 정보를 모으고, 핵심 개체를 뽑고, 변화를 추적하며, 여론을 가늠하도록 돕습니다.
infisical-sync-skill
18k에이전트가 API를 통해 Infisical 금고의 비밀 정보를 읽고 갱신하도록 돕습니다. 로그인 단계와 명확한 오류 처리를 포함합니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.