Problem Description
When using Docker Desktop on Windows with WSL, Docker Compose plugin upgrades create symlinks in $HOME/.docker/cli-plugins that point to Windows host paths (e.g., /mnt/c/Users/junhao/.docker/modules/cli-plugins-wsl/docker-compose).
Currently, if the symlink target's parent path is not mapped into the container, the compose plugin will not be found inside the container runtime.
Context
This issue was discovered during the containerization of CLP tools in PR #1512.
Example
- Symlink location:
$HOME/.docker/cli-plugins/docker-compose
- Symlink target:
/mnt/c/Users/junhao/.docker/modules/cli-plugins-wsl/docker-compose
- Issue: The target path
/mnt/c/Users/junhao/.docker/modules/cli-plugins-wsl/ needs to be mounted for the plugin to work inside the container.
Impact
The Docker Compose plugin may not be available inside the container when users have upgraded their plugins through Docker Desktop on Windows.
Reported by @junhaoliao in #1512 (comment)