[Bug]: Windows Docker Desktop + WSL2 环境下沙箱挂载 .gitconfig 失败
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- docker, go
- Domain
- devops, infrastructure
Research direction
Start by reproducing the Docker sandbox startup on Windows x86_64 with Docker Desktop and WSL2 using the YAML and runtime-v0.8.0 described in the issue. Trace the Docker driver’s persistent .gitconfig bind-mount handling and compare the resulting source and target types with the provided error log. Done means the sandbox starts and the persisted file is mounted at /root/.gitconfig on this environment.
Written by the indexing model from the issue text.
Description
Summary
在 Windows x86_64、Docker Desktop + WSL2 环境中,Agent Compose 服务和 UI 可以正常启动,项目 YAML 也能成功启用,但运行智能体时 Docker 沙箱启动失败。
失败发生在将持久化的 .gitconfig 文件挂载到 Guest 容器的 /root/.gitconfig 时。同一份 YAML 在 macOS Docker Desktop 环境下可以正常运行。
Steps to reproduce
- 在 Windows x86_64 上安装 Docker Desktop,并使用 WSL2 后端。
- 启动 agent-compose runtime-v0.8.0。
- 创建并启用以下项目:
name: simple-chat-agent
agents:
simple-assistant:
provider: codex
system_prompt: |
你是一个简洁、可靠的中文助手。
image: chaitin/agent-compose-guest:latest
driver:
docker: {}
scheduler:
enabled: false
capset_ids: []
enabled: true
在 UI 中运行 simple-assistant。
Docker 沙箱创建成功,但启动时挂载 /root/.gitconfig 失败。
4. Expected behavior
Docker 沙箱应当正常启动,并将持久化目录中的 .gitconfig 作为普通文件挂载到 Guest 容器的 /root/.gitconfig。
### Expected behavior
在 Windows Docker Desktop + WSL2 环境下,Docker 沙箱应当正常启动,并将持久化目录中的 .gitconfig 作为普通文件挂载到 Guest 容器的 /root/.gitconfig,智能体能够正常运行。
### Actual behavior
沙箱在启动智能体进程之前失败。Docker Desktop 通过 WSL2 转换挂载路径后,无法将 .gitconfig 挂载到 /root/.gitconfig,并提示源路径与目标路径的文件/目录类型不一致。
### Version or commit
_No response_
### Runtime driver
None
### Logs
```text
sandbox start failed: start docker container <container-id>:
Error response from daemon: failed to create task for container:
failed to create shim task:
OCI runtime create failed:
runc create failed:
unable to start container process:
error during container init:
error mounting "/run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu/<mount-id>"
to rootfs at "/root/.gitconfig":
mount src=<redacted>,
dst=/root/.gitconfig,
flags=MS_BIND|MS_REC:
not a directory:
Are you trying to mount a directory onto a file (or vice-versa)?
Check if the specified host path exists and is the expected type.
- Dominant language
- Go
- Stars
- 241
- Forks
- 45
- Avg merge
- 19h 10m
- Merged PRs (30d)
- 46
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from chaitin/agent-compose
-
Difficulty 5/5 Over a week Newbie friendliness 42/100
chaitin/agent-compose#700 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
chaitin/agent-compose#688 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
chaitin/agent-compose#680 ·
-
enhancement priority:pending triage:needs-info
Difficulty 5/5 Over a week Newbie friendliness 38/100
chaitin/agent-compose#674 · 1 comment ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
chaitin/agent-compose#671 ·
All issues in chaitin/agent-compose
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100