/ الدليل / الملعب / Container Use
● رسمي dagger ⚡ فوري

Container Use

بواسطة dagger · dagger/container-use

Isolated, parallel containerized environments for coding agents.

Container Use gives every coding agent its own ephemeral container — so multiple Claude sessions can build, test, and run the same repo at the same time without stepping on each other. Built on Dagger; each environment has its own filesystem, branch, and process tree.

لماذا تستخدمه

الميزات الأساسية

عرض مباشر

كيف يبدو في الممارسة

container-use-mcp.replay ▶ جاهز
0/0

التثبيت

اختر العميل

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "container-use-mcp": {
      "command": "cu",
      "args": [
        "mcp"
      ]
    }
  }
}

افتح Claude Desktop → Settings → Developer → Edit Config. أعد التشغيل بعد الحفظ.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "container-use-mcp": {
      "command": "cu",
      "args": [
        "mcp"
      ]
    }
  }
}

يستخدم Cursor نفس مخطط mcpServers مثل Claude Desktop. إعدادات المشروع أولى من الإعدادات العامة.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "container-use-mcp": {
      "command": "cu",
      "args": [
        "mcp"
      ]
    }
  }
}

انقر على أيقونة MCP Servers في شريط Cline الجانبي، ثم "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "container-use-mcp": {
      "command": "cu",
      "args": [
        "mcp"
      ]
    }
  }
}

نفس الصيغة مثل Claude Desktop. أعد تشغيل Windsurf لتطبيق التغييرات.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "container-use-mcp",
      "command": "cu",
      "args": [
        "mcp"
      ]
    }
  ]
}

يستخدم Continue مصفوفة من كائنات الخادم بدلاً من خريطة.

~/.config/zed/settings.json
{
  "context_servers": {
    "container-use-mcp": {
      "command": {
        "path": "cu",
        "args": [
          "mcp"
        ]
      }
    }
  }
}

أضف إلى context_servers. يعيد Zed التحميل تلقائيًا عند الحفظ.

claude mcp add container-use-mcp -- cu mcp

أمر من سطر واحد. تحقق باستخدام claude mcp list. احذف باستخدام claude mcp remove.

حالات الاستخدام

استخدامات عملية: Container Use

Try three refactoring approaches in parallel, keep the best

👤 Engineers exploring design space ⏱ ~15 min intermediate

متى تستخدمه: You have 3 different ideas for a refactor and want to see all of them run/pass tests before picking one.

المتطلبات الأساسية
  • Server/skill installed and authenticated — See repo README
الخطوات
  1. Spin up three isolated envs
    Create three container-use environments named refactor-a/b/c, all on this repo at HEAD.✓ تم النسخ
    → Three env_ids printed
  2. Apply each approach in its own env
    In refactor-a do the strategy-pattern version; in -b inline everything; in -c extract a service object. Run the full test suite in each. Report pass/fail and diff size.✓ تم النسخ
    → Per-env test summary and diff stats
  3. Pick the winner and merge
    Apply the diff from refactor-b to my working copy. Discard the other two environments.✓ تم النسخ
    → Patch applied locally

النتيجة: Three real experiments evaluated side-by-side without ever breaking your host repo.

المزالق
  • Forgetting to discard old envs leaks disk — Forgetting to discard old envs leaks disk — cu environment list then cu environment discard <id> periodically.
اجمعها مع: github · filesystem

التركيبات

اجمعها مع خوادم MCP أخرى لتحقيق نتائج x10

container-use-mcp + github

Pair with github for complementary capabilities

Use this server together with github to complete a multi-step task.✓ تم النسخ
container-use-mcp + filesystem

Pair with filesystem for complementary capabilities

Use this server together with filesystem to complete a multi-step task.✓ تم النسخ

الأدوات

ما يوفره هذا الـ MCP

الأداةالمدخلاتمتى تستدعيهاالتكلفة
environment_create name: str, image: str Start a fresh sandbox for the next task Local CPU/disk
environment_run_cmd env_id, cmd Execute build/test commands inside the sandbox free
environment_file_write env_id, path, contents Apply edits without touching the host free
environment_diff env_id Review the agent's work before merging back free

التكلفة والحدود

تكلفة التشغيل

حصة API
See provider docs for rate limits
الرموز لكل استدعاء
Varies by tool
التكلفة المالية
See repo README for pricing details
نصيحة
Cache tool results and avoid repeated identical calls.

الأمان

الصلاحيات والأسرار ونطاق الأثر

تخزين بيانات الاعتماد: Use environment variables; never commit secrets
نقل البيانات الخارجي: Tool calls go to the provider's API as documented

استكشاف الأخطاء

الأخطاء الشائعة وحلولها

docker daemon not running

Container Use requires a local Docker or compatible runtime. Start Docker Desktop or colima.

تحقق: Run `docker ps` successfully
out of disk

Old environments aren't auto-pruned. Run cu environment list then cu environment discard <id> for anything older than a day.

تحقق: Check `docker system df`

البدائل

Container Use مقابل البدائل

البديلمتى تستخدمهاالمقايضة
Dagger CloudYou want hosted, multi-tenant agent envsPaid; container-use is local-first

المزيد

الموارد

📖 اقرأ ملف README الرسمي على GitHub

🐙 تصفح القضايا المفتوحة

🔍 تصفح أكثر من 400 خادم MCP و Skills