WSL2 Ubuntu: Can't mount file named xxxx-configupdate.sh into container
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
On WSL2 If you try to mount a file (not directory) named xxxx-configupdate.sh into a container, it fails with "not a directory"
Given a file named xxxx-configupdate.sh in the current directory (the contents and permissions don't seem to matter), if you try to mount it into the container, you get "not a directory":
$ touch xxxx-configupdate.sh && docker run --name testme -it -v "$PWD/xxxx-configupdate.sh:/junk.sh" busybox tail -f /dev/null
docker: Error response from daemon: not a directory.
See 'docker run --help'.
Steps to reproduce the issue:
On wsl2, Ubuntu 18.04, Docker Desktop 3.4.0:
$ touch xxxx-configupdate.sh && docker run --name testme -it -v "$PWD/xxxx-configupdate.sh:/junk.sh" busybox tail -f /dev/null
docker: Error response from daemon: not a directory.
See 'docker run --help'.
Describe the results you expected:
On macOS and Linux, this just hangs as it should (tail -f /dev/null); the container is successfully created and all is well.
Additional information you deem important (e.g. issue happens only occasionally):
- this is highly sensitive to the host-side (source) filename! If you change the filename to just xxxx.sh or most anything else that doesn't contain "configupdate.sh" it works correctly.
- The target filename and mount point don't seem to matter at all.
- This is Docker Desktop 3.4.0 with the WSL2 backend, and this is inside WSL2. That's the only place I know how to make it happen.
Output of docker version:
Client: Docker Engine - Community
Cloud integration: 1.0.17
Version: 20.10.7
API version: 1.41
Go version: go1.13.15
Git commit: f0df350
Built: Wed Jun 2 11:56:47 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.7
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: b0f5bc3
Built: Wed Jun 2 11:54:58 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.6
GitCommit: d71fcd7d8303cbf684402823e425e9dd2e99285d
runc:
Version: 1.0.0-rc95
GitCommit: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
docker-init:
Version: 0.19.0
GitCommit: de40ad0```
**Output of `docker info`:**
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
compose: Docker Compose (Docker Inc., 2.0.0-beta.3)
scan: Docker Scan (Docker Inc., v0.8.0)
Server:
Containers: 5
Running: 3
Paused: 0
Stopped: 2
Images: 104
Server Version: 20.10.7
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: d71fcd7d8303cbf684402823e425e9dd2e99285d
runc version: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
init version: de40ad0
Security Options:
seccomp
Profile: default
Kernel Version: 5.10.16.3-microsoft-standard-WSL2
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 7.715GiB
Name: docker-desktop
ID: LYUY:HAZI:DC3M:TROF:2UE7:XNSA:JPQS:OD52:YOTB:SH5W:QBW5:OYWK
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
**Additional environment details (AWS, VirtualBox, physical, etc.):**
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.
Research direction
Start by reproducing the issue with the provided docker run -v command in WSL2 Ubuntu, then compare it with filenames that do not contain configupdate.sh. The payload names no repository files or tests; done means the file bind mount succeeds and the container starts as it does on macOS and Linux.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go, linux, ubuntu
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100