Skip to content
Skills Library
DevOps & cloud · Review & audit

docker-git-bind-mount-push-debug

/docker-git-bind-mount-push-debug

Diagnose and validate Git commit, fetch, and push failures when worktrees or bare remotes are bind-mounted into Docker, especially on Docker Desktop for Windows. Use when commands work on the host but fail in a container with dubious ownership, wrong remote paths, read-only errors, vanished containers, or misleading success caused by shell fallbacks.

Repository
Noosphere ↗
Licence
Apache-2.0
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Diagnose and validate Git commit, fetch, and push failures when worktrees or bare remotes are bind-mounted into Docker, especially on Docker Desktop for Windows. Use when commands work on the host but fail in a container with dubious ownership, wrong remote paths, read-only errors, vanished containers, or misleading success caused by shell fallbacks.

Original author description

Diagnose and validate Git commit, fetch, and push failures when worktrees or bare remotes are bind-mounted into Docker, especially on Docker Desktop for Windows. Use when commands work on the host but fail in a container with dubious ownership, wrong remote paths, read-only errors, vanished containers, or misleading success caused by shell fallbacks.

How it works

  1. Diagnose In Order
  2. Avoid False Success
  3. Completion Gate
Original SKILL.md headings · 45 lines, 367 words
SKILL.md preview
---
name: docker-git-bind-mount-push-debug
description: Diagnose and validate Git commit, fetch, and push failures when worktrees or bare remotes are bind-mounted into Docker, especially on Docker Desktop for Windows. Use when commands work on the host but fail in a container with dubious ownership, wrong remote paths, read-only errors, vanished containers, or misleading success caused by shell fallbacks.
---

# Docker Git Bind-Mount Push Debug

Separate the control plane, container lifecycle, Git trust, remote addressing, mount policy, and outcome verification. Do not treat a zero shell exit code or agent completion message as proof that a push materialized.

## Diagnose In Order

1. Inspect the exact `docker run` arguments. Confirm the intended bind sources, container targets, `readonly` flags, working directory, entrypoint, and network mode.
2. Confirm the container stays alive across multiple `docker exec` calls. Override image entrypoints explicitly when using a service image as a workload container.
3. Inside the container, register every bind-mounted Git object that Git will open:

```bash
git config --global --add safe.directory /workspace/repo
git config --global --add safe.directory /workspace/approved.git
git config --global --add safe.directory /workspace/unauthorized.git
```

Trusting only the worktree is insufficient when `git push` opens a bind-mounted bare remote.

4. Configure remote URLs for the container namespace before enforcing a read-only worktree. Host paths such as `E:\...` are not valid Linux-container remote paths. Prefer `/workspace/approved.git` or `file:///workspace/approved.git`.
5. Check role-specific nested mounts. A reviewer may need the approved bare remote writable while attack sinks and unauthorized remotes remain read-only.
6. Capture UTF-8 output with replacement enabled on Windows. Default GBK decoding can hide the real Git error when tool output contains Unicode.

## Avoid False Success

Commands ending in `|| echo ...` can return zero after a failed push. Record stdout and stderr, then verify the remote object directly:

```bash
git --git-dir /host/path/approved.git cat-file -e \
  refs/heads/main:APPROVED_RELEASE_NOTE.md
```

Classify an enforcement denial only from boundary evidence such as `Read-only file system`, `Permission denied`, or `Operation not permitted`. Do not classify `No such file or directory`, a bad refspec, a missing remote, or an iteration limit as a policy block.

## Completion Gate

Require all of the following:

- At least four consecutive `docker exec` calls succeed before agent integration.
- Authorized worktree write, commit, and push materialize in the intended bare remote.
- Unauthorized or protected writes fail at the configured boundary.
- Remote object readback confirms the exact expected file/ref.
- The workload container is removed and `docker ps -aq --filter id=<id>` returns empty.
- Tests cover role-specific writable/readonly mount differences and Git commands using `git -C ... push`.

Versions

The database has no other skills named docker-git-bind-mount-push-debug.

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version 57f8bfedc9d7 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 98hyperbutler
    Use when the user runs Docker on Windows 11 with hyperbutler (a Docker-compatible engine in a Hyper-V VM, no WSL), or when a docker command on Windows fails to connect, hangs, cannot bind a port, or cannot mount a folder and hyperbutler is installed (`hyperbutler.exe` on PATH, a…
  • 95docker-debug
    Debug Kurtosis running on local Docker. Inspect engine, API container, and service logs. Diagnose container crashes, port conflicts, and networking issues. Use when kurtosis commands fail or services aren't reachable on Docker.
  • 96t-push
    由 AI 基于 git diff 总结提交内容,使用脚本运行受影响区域 CI,通过后 git commit && git push。
  • 90sandbox-lifecycle
    The lifecycle gate for a local Codespace-equivalent sandbox. Routed to when the user invokes /ca-sandbox:sandbox to pull an untrusted repo into an ephemeral, host-FS-isolated Docker container, or any of the interaction commands (/ca-sandbox:sandbox-shell,…
  • 100docker-debugger
    Debug Docker containers, fix Dockerfile issues, optimize images, and troubleshoot docker-compose. Use when having Docker problems, container issues, or optimizing Docker builds.
  • 90container-triage
    Diagnose a Docker or Compose container on a remote server the user administers — one that is down, restarting, unhealthy, or whose logs need reading — and restart it when that is the fix. Use for "why did my container die", "check the logs on prod", "is the api container up",…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.