スキル一覧に戻る
windzu

docker-dev-env

by windzu

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

SKILL.md


name: docker-dev-env description: Create Docker-based development environments with docker-compose. Use when users want to set up containerized dev environments, create Dockerfile/docker-compose.yml for projects, or need isolated development containers. Handles Python, Node.js, and general-purpose environments with Chinese mirror sources, proper user permissions, and helper scripts.

Docker Development Environment

Create standardized, reproducible development environments using Docker and docker-compose.

Workflow

1. Gather Requirements (REQUIRED)
   └─> Ask user about: language/framework, ports, additional tools

2. Generate Files
   ├─> init-env.sh (from scripts/)
   ├─> enter.sh (from scripts/)
   ├─> Dockerfile (from templates)
   └─> docker-compose.yml (from templates)

3. Initialize
   └─> Run ./init-env.sh to generate .env

4. Start
   └─> docker compose up

Step 1: Gather Requirements

ALWAYS ask before generating files:

  • What programming language/framework? (Python, Node.js, Go, etc.)
  • What version? (Python 3.11, Node 20, etc.)
  • What ports need to be exposed?
  • Any additional system packages?
  • Any specific services needed? (database, cache, etc.)

Step 2: Generate Files

Required Files

  1. Copy helper scripts from this skill's scripts/ directory:

    • init-env.sh - Generates .env with host user info
    • enter.sh - Enter running container
  2. Create Dockerfile following dockerfile-best-practices.md:

    • Use appropriate base image
    • Configure Chinese mirrors (see mirrors.md)
    • Set up user with HOST_UID/HOST_GID args
    • Install required packages
  3. Create docker-compose.yml:

    • Map current directory to /workspace
    • Pass build args from .env
    • Configure ports and volumes

See templates.md for complete examples.

File Structure

project/
├── .env              # Generated by init-env.sh
├── .dockerignore
├── Dockerfile
├── docker-compose.yml
├── init-env.sh
└── enter.sh

docker-compose.yml Structure

services:
  dev:
    build:
      context: .
      args:
        HOST_UID: ${HOST_UID}
        HOST_GID: ${HOST_GID}
        HOST_USER: ${HOST_USER}
    container_name: ${COMPOSE_PROJECT_NAME:-dev}
    volumes:
      - .:/workspace
    stdin_open: true
    tty: true

Step 3: Initialize & Start

Instruct user:

# First time setup
chmod +x init-env.sh enter.sh
./init-env.sh

# Start container
docker compose up -d

# Enter container
./enter.sh

Key Principles

  1. User permission mapping - Container user UID/GID matches host to avoid permission issues
  2. Chinese mirror sources - Faster builds in China (Tsinghua by default)
  3. Simple startup - Just docker compose up, no extra parameters
  4. Workspace mapping - Project directory mounted at /workspace

References

スコア

総合スコア

50/100

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

SKILL.md

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

+20
LICENSE

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

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

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

0/5
Issue管理

オープンIssueが50未満

+5
言語

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

+5
タグ

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

0/5

レビュー

💬

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