Index of every page on this site: llms.txt
All skills
Run it yourself

Use when YOU (the AI agent) are running on Windows OUTSIDE WSL (Git Bash/MSYS/PowerShell shell) and need to run ANY docker / docker compose command. Docker Desktop runs on the WSL2 engine, so commands must be re-issued INSIDE WSL via wsl.exe -- running them from the Windows shell on a network/SMB drive (Z:, UNC) corrupts bind-mount paths. Does NOT apply if your shell is already inside WSL. Triggers on: docker, docker compose, docker-compose, container, bind mount, volume, 'is a directory', mount source wrong, Windows + Docker Desktop, WSL.

Use this Skill: https://skilld.dev/gh/netresearch/docker-development-skill/docker-via-wsl

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesdiagnosis-and-fix.md

≈458 tokens on demand. Your agent reads this file only when SKILL.md points to it.

<!-- SPDX-License-Identifier: CC-BY-SA-4.0 --> <!-- SPDX-FileCopyrightText: Netresearch DTT GmbH -->

Diagnosis and Fix: Wrong Bind Mount from a Windows Shell

Use this when a container's bind mount looks wrong (a phantom directory, an empty mount, or Is a directory where a file was expected) and you suspect Docker was driven from a Windows shell instead of from WSL.

Diagnosis

# 1. What path did Docker actually mount? Look for a duplicated/odd segment.
docker inspect <container> --format '{{range .Mounts}}{{.Destination}} <- {{.Source}}{{"\n"}}{{end}}'

# 2. What does the container actually see vs the host?
docker exec <container> ls -la <mount-target>     # container view
ls -la <host-dir>                                 # host (Windows) view
#   Divergence (host shows file X, container shows empty or a phantom dir)
#   == path-translation mismatch -> you are driving Docker from Windows/SMB.

# 3. Confirm the WSL2 backend + which distro is integrated:
wsl.exe -l -v

A bind .Source containing /run/desktop/mnt/host/uC/<ip>/... (UNC-translated), especially with a doubled directory segment, is the tell-tale sign.

Fix

  • Re-issue the command from inside WSL against the native Linux path:

    wsl.exe -e bash -lc "cd /home/<user>/<project> && docker compose up -d"
  • If Docker already auto-created a phantom bind directory, remove it from the view that Docker uses (a throwaway container rm -rf on the mount, or delete it on the Linux filesystem), then recreate the container from WSL:

    wsl.exe -e bash -lc "docker run --rm -v /home/<user>/<project>:/work alpine rm -rf /work/<phantom-dir>"
  • Keep the project on the Linux filesystem the WSL distro sees natively (/home/<user>/...), not browsed through a Windows drive letter or SMB share.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 alert1d3 checks · Risk SAFE
  • Gen Agent Trust Hub1d

    The skill provides guidance for AI agents on how to correctly run Docker commands from a Windows host using WSL2 to prevent directory mount corruption. It uses standard command-line tools to diagnose and fix path translation issues.

  • Socket1d

    No alerts

  • Snyk1d

    Risk: CRITICAL · 2 issues

Signed by skilld at d8c20ad. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 4 days ago
What it can do
Runs commands Reads files
compatibility
Windows host with Docker Desktop using the WSL2 backend.
All 8 allowed tools
Bash(docker version:*)Bash(docker info:*)Bash(docker ps:*)Bash(docker inspect:*)Bash(uname:*)ReadGlobGrep
Other metadata
metadata
{
  "version": "1.21.0",
  "repository": "https://github.com/netresearch/docker-development-skill",
  "author": "Netresearch DTT GmbH"
}

README badge

README badge for netresearch/docker-development-skill/docker-via-wsl