Docker Community Forums

Share and learn in the Docker community.

2.3.0.2 Broken Bind mounts

All my containers are no longer bind mounting. Is there a change in the formatting of the bind command I need to make?

I have about 20 containers that were all working before the update was installed. Some are throwing an error and not starting. others are starting but not mounting the correct data, ie they look like a fresh container. As a relatively new docker user, I am not sure where to start troubling shooting. I have found discussions about file cache/consistency commands but that seems to be related to a different problem. Windows 10 is fully updated.

Alternatively, what is the best way to downgrade docker desktop back to 2.1?

Hello unknownkwita,

Check the log of your container : docker container logs CONTAINER to begin troubleshooting.

Best Regards,
Fouscou.

It would appear that Docker 2.3.0.2 has issues with bind mounts on windows, I, and others, downgraded to 2.2.0.5 to resolve the issue. I found a workaround here: https://github.com/microsoft/mssql-docker/issues/600

Steps to reproduce the behavior
Mounting C::
docker run -it -v /var/run/docker.sock:/var/run/docker.sock -v /C/:/w -w /w ubuntu:20.04
Check if C: is mounted properly: pwd && ls
Now, mount /C in another container

root@66896a0d8f2c:/w# apt-get update && apt-get install -y docker.io

root@66896a0d8f2c:/w# docker run -it -v /C:/w -w /w ubuntu bash -c ‘pwd && ls -l’
**/w
total 0
drwxr-xr-x 3 root root 60 May 11 15:42 Users
BUG: Mounding /C into another counter does not work properly! the second container only sees “C:\Users”!

Mounting C:\temp:
docker run -it -v /var/run/docker.sock:/var/run/docker.sock -v /C/temp:/w -w /w ubuntu:20.04
Check if C:\temp is mounted properly: pwd && ls
Now, mount /C/temp in another container

root@66896a0d8f2c:/w# apt-get update && apt-get install -y docker.io
root@66896a0d8f2c:/w# docker run -it -v /C/temp:/w -w /w ubuntu bash -c ‘pwd && ls -l’
/w
total 0
BUG: None of the files or directories in c:\temp will be displayed!

Nice find @brokenpixel. I think I will spin down my docker setup until that bug is hopefully fixed in a future version.

I retested with the new docker release, version 2.3.0.3, and my problems are resolved.
See more details @ https://github.com/docker/for-win/issues/6646

Yep, 2.3.0.3 has resolved my issue. Thanks everone :slight_smile:

I have found some issues with 2.3.0.3 as well, that are not present on 2.2.0.5: It will fail to create a file on a bind mount when doing so as a non root user. Specifically when i try to restore an sqlserver-2019-based database from backup using a bind mount for the data directory, it will fail when restoring to a clean database and the database file (i.e databasename.mdf) is not present. The database process is unable to create the file on the bind mount.
This might be a breaking change, but correct behavior or a bug in docker, I dont really care at the moment. For now, I have reverted back to 2.2.0.5 again.

Edit: found the link to a github issue describing my error: https://github.com/docker/for-win/issues/7259