Closed XLixl4snSU closed 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
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
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
Steps to reproduce the behavior
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 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