docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.86k stars 289 forks source link

Mounting fails the after the second time a container is created #13007

Closed XLixl4snSU closed 1 year ago

XLixl4snSU commented 2 years ago

Actual behavior

When (re)creating a docker container multiple times the docker "-v" and "--mount" flags result in an error.

docker: Error response from daemon: invalid mount config for type "bind": stat /run/desktop/mnt/host/c/Docker/docker-test/testfolder/local: input/output error.

I'm using the WSL2 backend and have already reinstalled docker multiple times. The first time I create the container when docker is freshly started it works perfectly fine (the folders are correctly mounted). But when I stop the container, rm it and create it again it will fail with the mentioned error. After a restart of the docker service it will work again for one time.

I have already tried multiple variants of the path style (without $(PWD) ) including double backslashes \, forward / slashes, writing \c\ and so on. Nothing helped.

I also moved the folder to different drives.

The problem started a few weeks ago, but I wasn't able to correlate it to an windows or docker update.

Expected behavior

I should be able to create a container with the following command, stop and rm it and create it again without having to restart the docker service.

docker run --name test --privileged -e "backup_port=1234" --mount type=bind,source="${PWD}"\local,target=/mnt/local --mount type=bind,source="${PWD}"\sftp,target=/mnt/sftp --mount type=bind,source="${PWD}"\config,target=/config -it xxx/xxx:xxx

Information

Output of & "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check

[2022-10-10T16:13:12.780509200Z][com.docker.diagnose.exe][I] set path configuration to OnHost Starting diagnostics

[PASS] DD0027: is there available disk space on the host? [PASS] DD0028: is there available VM disk space? [PASS] DD0031: does the Docker API work? [PASS] DD0004: is the Docker engine running? [PASS] DD0011: are the LinuxKit services running? [PASS] DD0016: is the LinuxKit VM running? [PASS] DD0001: is the application running? [SKIP] DD0018: does the host support virtualization? [PASS] DD0002: does the bootloader have virtualization enabled? [PASS] DD0017: can a VM be started? [PASS] DD0024: is WSL installed? [PASS] DD0021: is the WSL 2 Windows Feature enabled? [PASS] DD0022: is the Virtual Machine Platform Windows Feature enabled? [PASS] DD0025: are WSL distros installed? [PASS] DD0026: is the WSL LxssManager service running? [PASS] DD0029: is the WSL 2 Linux filesystem corrupt? [PASS] DD0035: is the VM time synchronized? [PASS] DD0015: are the binary symlinks installed? [PASS] DD0003: is the Docker CLI working? [PASS] DD0013: is the $PATH ok? [PASS] DD0005: is the user in the docker-users group? [PASS] DD0007: is the backend responding? [FAIL] DD0014: are the backend processes running? 1 error occurred:

  • vpnkit.exe is not running

[PASS] DD0008: is the native API responding? [PASS] DD0009: is the vpnkit API responding? [PASS] DD0010: is the Docker API proxy responding? [PASS] DD0006: is the Docker Desktop Service responding? [PASS] DD0012: is the VM networking working? [PASS] DD0032: do Docker networks overlap with host IPs? [SKIP] DD0030: is the image access management authorized? [PASS] DD0033: does the host have Internet access? segment 2022/10/10 18:13:23 ERROR: sending request - Post "https://api.segment.io/v1/batch": dial tcp: lookup api.segment.io: getaddrinfow: The requested name is valid, but no data of the requested type was found. segment 2022/10/10 18:13:23 ERROR: 1 messages dropped because they failed to be sent and the client was closed

Please investigate the following 1 issue:

1 : The test: are the backend processes running? Failed with: 1 error occurred:

  • vpnkit.exe is not running

Not all of the backend processes are running.

Steps to reproduce the behavior

  1. docker run --name test --privileged -e "backup_port=1234" --mount type=bind,source="${PWD}"\local,target=/mnt/local --mount type=bind,source="${PWD}"\sftp,target=/mnt/sftp --mount type=bind,source="${PWD}"\config,target=/config -it xxx/xxx:xxx
  2. docker stop test
  3. docker rm test
  4. docker run --name test --privileged -e "backup_port=1234" --mount type=bind,source="${PWD}"\local,target=/mnt/local --mount type=bind,source="${PWD}"\sftp,target=/mnt/sftp --mount type=bind,source="${PWD}"\config,target=/config -it xxx/xxx:xxx
docker-robott commented 1 year ago

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

docker-robott commented 1 year ago

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

/lifecycle locked