Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mounted volumes are empty in the container. #25

Closed
bagratte opened this issue Aug 5, 2016 · 106 comments

Comments

@bagratte
Copy link

commented Aug 5, 2016

Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS C:\Users\bagratte> dir stitch


    Directory: C:\Users\bagratte\stitch


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----         8/5/2016   1:04 PM              0 lilo.txt
-a----         8/5/2016   1:04 PM              0 mushu.txt


PS C:\Users\bagratte> docker run --rm -v c:/Users/bagratte/stitch:/data alpine ls -la /data
total 4
drwxr-xr-x    2 root     root            40 Aug  5 09:05 .
drwxr-xr-x   25 root     root          4096 Aug  5 09:05 ..
PS C:\Users\bagratte>

7DF51AAC-D04D-4FDC-AE2F-D19EAA0DC8EF/2016-08-05_13-06-39

@bagratte bagratte changed the title Mounted volumes are emty in the container. Mounted volumes are empty in the container. Aug 5, 2016

@dgageot

This comment has been minimized.

Copy link

commented Aug 5, 2016

Hi @bagratte, thank you for taking the time to report the issue.

Have you shared the C drive before you run the docker command?

capture

@dgageot dgageot added the kind/bug label Aug 5, 2016

@bagratte

This comment has been minimized.

Copy link
Author

commented Aug 5, 2016

Yes, I had shared the C drive as in your screenshot.

@Kantis

This comment has been minimized.

Copy link

commented Aug 5, 2016

Also having this problem.

C:\Users\emil.kantis> docker run --rm -v c:/Users:/data alpine ls /data
C:\Users\emil.kantis> ls C:/users


     Directory: C:\users


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       2016-08-05     11:32                administrator
d-----       2016-08-04     13:41                Default.migrated
d-----       2016-08-05     12:53                Dockerhost
d-----       2016-08-04     13:45                Emil
d-----       2016-08-05     10:13                emil.kantis
d-----       2016-08-04     13:50                PEadmin
d-r---       2016-08-04     13:40                Public
[13:22:35.071][ApiProxy       ][Info   ] proxy >> POST /v1.24/containers/create [rewriteBinds] 
[13:22:35.073][ApiProxy       ][Info   ] Rewrote mount c:/Users:/data (volumeDriver=) to /c/Users:/data
[13:22:35.096][ApiProxy       ][Info   ] Failed to Walk to [snapshots 7244a4d64be1fd01a67c160cf6869899b3c192d9 ro com.docker.driver.amd64-linux proxy http] 9p: No such file or directory
[13:22:35.098][ApiProxy       ][Info   ] Failed to read proxies/http from snaphshot p9p.MessageRerror{Ename:"No such file or directory"}

Shared in Docker for win

Filesystem

I've tried unsharing/re-sharing, uninstalling and re-installing docker

@ProCynic

This comment has been minimized.

Copy link

commented Aug 5, 2016

Same here.

PS D:\> docker run --rm -v c:/Users:/data alpine ls -a /data
.
..
PS D:\>

image

PS D:\> docker --version
Docker version 1.12.0, build 8eab29e
PS D:\> docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 10
Server Version: 1.12.0
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 17
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge overlay host null
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.15-moby
Operating System: Alpine Linux v3.4
OSType: linux
Architecture: x86_64
CPUs: 6
Total Memory: 8.021 GiB
Name: moby
ID: 6A56:MU5U:HN2X:F2XP:KKZR:DUFM:B4RB:RMNP:DQXA:U745:UYNW:KFZ5
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
 127.0.0.0/8

EDIT: add relevant log section

[19:43:24.684][ApiProxy       ][Info   ] proxy >> POST /v1.24/containers/create [rewriteBinds]
[19:43:24.688][ApiProxy       ][Info   ] Rewrote mount c:/Users:/data (volumeDriver=) to /c/Users:/data
[19:43:24.702][ApiProxy       ][Info   ] Failed to Walk to [snapshots 33809d47c4c64c6834bbfa8ead740e920317cd32 ro com.docker.driver.amd64-linux proxy http] 9p: No such file or directory
[19:43:24.705][ApiProxy       ][Info   ] Failed to read proxies/http from snaphshot p9p.MessageRerror{Ename:"No such file or directory"}
[19:43:24.711][ApiProxy       ][Info   ] proxy >> POST /v1.24/containers/create
[19:43:24.715][ApiProxy       ][Info   ] Dial Hyper-V socket 81e04832-8a73-4b67-90bb-a3bb3ce5b156:23a432c2-537a-4291-bcb5-d62504644739
[19:43:24.819][ApiProxy       ][Info   ] proxy << POST /v1.24/containers/create
[19:43:24.827][ApiProxy       ][Info   ] proxy >> POST /v1.24/containers/7441d331ab6a2e78a5669c5fcbca9a664140d87038f1df3b5247a7bf10ccbc04/attach?stderr=1&stdout=1&stream=1
[19:43:24.834][ApiProxy       ][Info   ] Dial Hyper-V socket 81e04832-8a73-4b67-90bb-a3bb3ce5b156:23a432c2-537a-4291-bcb5-d62504644739
[19:43:24.841][ApiProxy       ][Info   ] Upgrading to raw stream
[19:43:24.849][ApiProxy       ][Info   ] proxy >> POST /v1.24/containers/7441d331ab6a2e78a5669c5fcbca9a664140d87038f1df3b5247a7bf10ccbc04/start [start]
[19:43:24.855][ApiProxy       ][Info   ] proxy >> POST /v1.24/containers/7441d331ab6a2e78a5669c5fcbca9a664140d87038f1df3b5247a7bf10ccbc04/start
[19:43:24.859][ApiProxy       ][Info   ] Dial Hyper-V socket 81e04832-8a73-4b67-90bb-a3bb3ce5b156:23a432c2-537a-4291-bcb5-d62504644739
[19:43:25.156][ApiProxy       ][Info   ] proxy << POST /v1.24/containers/7441d331ab6a2e78a5669c5fcbca9a664140d87038f1df3b5247a7bf10ccbc04/start
[19:43:25.243][ApiProxy       ][Info   ] proxy << POST /v1.24/containers/7441d331ab6a2e78a5669c5fcbca9a664140d87038f1df3b5247a7bf10ccbc04/attach?stderr=1&stdout=1&stream=1
[19:43:25.248][ApiProxy       ][Info   ] proxy >> POST /v1.24/containers/7441d331ab6a2e78a5669c5fcbca9a664140d87038f1df3b5247a7bf10ccbc04/wait
[19:43:25.252][ApiProxy       ][Info   ] Dial Hyper-V socket 81e04832-8a73-4b67-90bb-a3bb3ce5b156:23a432c2-537a-4291-bcb5-d62504644739
[19:43:25.549][ApiProxy       ][Info   ] proxy << POST /v1.24/containers/7441d331ab6a2e78a5669c5fcbca9a664140d87038f1df3b5247a7bf10ccbc04/wait
[19:43:25.556][ApiProxy       ][Info   ] proxy >> GET /v1.24/containers/7441d331ab6a2e78a5669c5fcbca9a664140d87038f1df3b5247a7bf10ccbc04/json
[19:43:25.564][ApiProxy       ][Info   ] Dial Hyper-V socket 81e04832-8a73-4b67-90bb-a3bb3ce5b156:23a432c2-537a-4291-bcb5-d62504644739
[19:43:25.570][ApiProxy       ][Info   ] proxy << GET /v1.24/containers/7441d331ab6a2e78a5669c5fcbca9a664140d87038f1df3b5247a7bf10ccbc04/json
[19:43:25.581][ApiProxy       ][Info   ] proxy >> DELETE /v1.24/containers/7441d331ab6a2e78a5669c5fcbca9a664140d87038f1df3b5247a7bf10ccbc04?force=1&v=1
[19:43:25.587][ApiProxy       ][Info   ] Dial Hyper-V socket 81e04832-8a73-4b67-90bb-a3bb3ce5b156:23a432c2-537a-4291-bcb5-d62504644739
[19:43:25.594][ApiProxy       ][Info   ] proxy << DELETE /v1.24/containers/7441d331ab6a2e78a5669c5fcbca9a664140d87038f1df3b5247a7bf10ccbc04?force=1&v=1
@johnrb2

This comment has been minimized.

Copy link

commented Aug 5, 2016

Samsies

Update: tried changing password (removed special characters), but it did not fix my problem.

Update 2: Another thing I can't figure out and I think it is related is that with the docker-toolbox I could use and from there I was able to login and pull my image into my vm. I am unable to ssh into MobyLinuxVM. Also when I pull up the vm through the Hyper-V Manager it just shows a black screen, so I can't even do anything from there. Should I just use a docker-compose file instead of trying to mount?

diagnostic id: 1A1304D4-EA05-47A9-88C8-55DB45E9BA2E/2016-08-09_12-59-31

Update3: I installed beta 23 and it is still not working for me. I am on a domain computer

diagnostic id: D91B0EBA-383B-4CC3-9C6F-FA4C02EE6D81/2016-08-17_12-26-28

Update4: It still is not working even with [domain][username] as login or [computer name].[domain][username]

Not sure if it helps to know or not but I use vpn cisco anyconnect v 3 client as well.

diagnostic id: D91B0EBA-383B-4CC3-9C6F-FA4C02EE6D81/2016-08-19_11-53-10

Update5: I am working on an older DELL Latitude. I have upgraded it to Windows 10, but it looks like the machine isn't supported by Windows 10. It runs fine, but I have noticed it doesn't seem to like my CD/DVD drive. Could this be having an adverse affect on mounting the mobylinux.iso?

@hineios

This comment has been minimized.

Copy link

commented Aug 5, 2016

Also the same problem.
I think it is because of some issues with permissions.

When I try to run containers that need to write some files to the disk (like for instance, Bitnami's laravel container) the container fails to write those files due to a permission denied error.

docker-permission_denied_error

That's probably related to the reason why there are no listed files on mounted volumes.

I've even twiked arround on the windows permission system giving full access to everyone in the folder of the project with no success.

uploaded diagnostic ID: 618072AE-BDD6-4A12-8E6B-BD3E53120D0F/2016-08-05_22-16-01

@searene

This comment has been minimized.

Copy link

commented Aug 6, 2016

Same problem here. I've tried multiple commands to mount the host directory, but none of them worked.

docker run --rm -v c:/Users/myusername/Downloads:/data ubuntu ls -la /data
total 4
drwxr-xr-x  2 root root   40 Aug  6 02:53 .
drwxr-xr-x 34 root root 4096 Aug  6 02:53 ..

/data was created, but it contained nothing.

@friism

This comment has been minimized.

Copy link

commented Aug 6, 2016

Can you check whether you have 3rd party antivirus software installed? Some users have reported problems due to that:

@searene

This comment has been minimized.

Copy link

commented Aug 6, 2016

Yes, I have Mcafee installed and I don't have the permission to uninstall or disable it. I guess the anitvirus software might be the reason but there's no way for me to check it.

@ProCynic

This comment has been minimized.

Copy link

commented Aug 6, 2016

@friism I've just got windows defender and firewall. Everything default I think.

@ProCynic

This comment has been minimized.

Copy link

commented Aug 6, 2016

@friism oh wow, just got it. Based on a comment in that forum thread you linked, I changed my windows password to not have special characters, reset the credentials in docker, and it started working. I don't know what docker is doing with passwords. How bizarre.

@hineios

This comment has been minimized.

Copy link

commented Aug 6, 2016

Well the password thing did it for me!
thanks @ProCynic

@bagratte

This comment has been minimized.

Copy link
Author

commented Aug 6, 2016

I also confirm the workaround of removing special characters from the password. In my case the offending character was the semicolon (;).
This must be either documented or, better still, fixed.

@jpek42

This comment has been minimized.

Copy link

commented Aug 6, 2016

I've had nothing but flaky behavior with shared drives with DFW for months. Just updated to the latest build (5971), and have shared my 2 drives. One of them appears to be visible, while the other is not:

PS C:\Users\pekj> docker run --rm -v d:/:/data alpine ls /data
PS C:\Users\pekj>

Maybe this is some sort of permissions thing, but as I provided my own credentials, not sure what it could be. Here is log snippet from above:

[08:09:57.351][ApiProxy ][Info ] proxy >> POST /v1.24/containers/create [rewriteBinds]
[08:09:57.354][ApiProxy ][Info ] Rewrote mount d:/:/data (volumeDriver=) to /d:/data
[08:09:57.365][ApiProxy ][Info ] Failed to Walk to [snapshots 3ffc6ae09d300fab4008d79f7e94b1886ab0830e ro com.docker.driver.amd64-linux proxy http] 9p: No such file or directory
[08:09:57.368][ApiProxy ][Info ] Failed to read proxies/http from snaphshot p9p.MessageRerror{Ename:"No such file or directory"}
[08:09:57.371][ApiProxy ][Info ] proxy >> POST /v1.24/containers/create
[08:09:57.373][ApiProxy ][Info ] Dial Hyper-V socket c54bc9af-2a64-4e51-9d3d-4a95d2eda316:23a432c2-537a-4291-bcb5-d62504644739
[08:09:57.471][ApiProxy ][Info ] proxy << POST /v1.24/containers/create
[08:09:57.480][ApiProxy ][Info ] proxy >> POST /v1.24/containers/51e14c432369325c6ebac0ca0c51460eb75a407242b8941eb7184fce4742d252/attach?stderr=1&stdout=1&stream=1
[08:09:57.482][ApiProxy ][Info ] Dial Hyper-V socket c54bc9af-2a64-4e51-9d3d-4a95d2eda316:23a432c2-537a-4291-bcb5-d62504644739
[08:09:57.485][ApiProxy ][Info ] Upgrading to raw stream
[08:09:57.487][ApiProxy ][Info ] proxy >> POST /v1.24/containers/51e14c432369325c6ebac0ca0c51460eb75a407242b8941eb7184fce4742d252/start [start]
[08:09:57.490][ApiProxy ][Info ] proxy >> POST /v1.24/containers/51e14c432369325c6ebac0ca0c51460eb75a407242b8941eb7184fce4742d252/start
[08:09:57.495][ApiProxy ][Info ] Dial Hyper-V socket c54bc9af-2a64-4e51-9d3d-4a95d2eda316:23a432c2-537a-4291-bcb5-d62504644739
[08:09:57.730][ApiProxy ][Info ] proxy << POST /v1.24/containers/51e14c432369325c6ebac0ca0c51460eb75a407242b8941eb7184fce4742d252/start
[08:09:57.783][ApiProxy ][Info ] proxy << POST /v1.24/containers/51e14c432369325c6ebac0ca0c51460eb75a407242b8941eb7184fce4742d252/attach?stderr=1&stdout=1&stream=1
[08:09:57.786][ApiProxy ][Info ] proxy >> POST /v1.24/containers/51e14c432369325c6ebac0ca0c51460eb75a407242b8941eb7184fce4742d252/wait
[08:09:57.788][ApiProxy ][Info ] Dial Hyper-V socket c54bc9af-2a64-4e51-9d3d-4a95d2eda316:23a432c2-537a-4291-bcb5-d62504644739
[08:09:58.012][ApiProxy ][Info ] proxy << POST /v1.24/containers/51e14c432369325c6ebac0ca0c51460eb75a407242b8941eb7184fce4742d252/wait
[08:09:58.022][ApiProxy ][Info ] proxy >> GET /v1.24/containers/51e14c432369325c6ebac0ca0c51460eb75a407242b8941eb7184fce4742d252/json
[08:09:58.034][ApiProxy ][Info ] Dial Hyper-V socket c54bc9af-2a64-4e51-9d3d-4a95d2eda316:23a432c2-537a-4291-bcb5-d62504644739
[08:09:58.043][ApiProxy ][Info ] proxy << GET /v1.24/containers/51e14c432369325c6ebac0ca0c51460eb75a407242b8941eb7184fce4742d252/json
[08:09:58.048][ApiProxy ][Info ] proxy >> DELETE /v1.24/containers/51e14c432369325c6ebac0ca0c51460eb75a407242b8941eb7184fce4742d252?force=1&v=1
[08:09:58.053][ApiProxy ][Info ] Dial Hyper-V socket c54bc9af-2a64-4e51-9d3d-4a95d2eda316:23a432c2-537a-4291-bcb5-d62504644739
[08:09:58.060][ApiProxy ][Info ] proxy << DELETE /v1.24/containers/51e14c432369325c6ebac0ca0c51460eb75a407242b8941eb7184fce4742d252?force=1&v=1

I do not have special characters in my password.

@technivore

This comment has been minimized.

Copy link

commented Aug 8, 2016

I am affected by this issue as well. I log into my machine with a domain account (username = "mtr932") and when I use that account's credentials to share the C: drive (specifying them in "domain\username" format) and then run the command in the "shared drives" dialog, I see this:

PS C:\Users\mtr932> docker run --rm -v c:/Users:/data alpine ls /data
mtr932

If I create a local administrator on the machine and use those credentials instead to share the C: drive, I see this instead:

PS C:\Users\mtr932> docker run --rm -v c:/Users:/data alpine ls /data
All Users
Default
Default User
Default.migrated
MSOLAP$SQLEXPRESS
MSSQL$SQLEXPRESS
Matthew
Public
defaultuser0
desktop.ini
mtr932

Obviously there is a lot of junk in there but the point is the local administrator account can see things that the domain account can't even though the domain account I use is in the local administrator group.

The domain account does have a non-alphanumeric character in its password but it is still an ASCII character. Because of my employer's password policy I can't create a password that only contains alphanumeric characters.

I would just stick with the local administrator account to share the C: drive except when I do so, I still cannot mount any files or folders within my domain user's account (C:\Users\mtr932):

PS C:\Users\mtr932> docker run --rm -v c:/Users/mtr932:/data alpine ls /data
PS C:\Users\mtr932>

If I share my C: drive using the domain account's credentials and run that same command I get this output:

PS C:\Users\mtr932> docker run --rm -v c:/Users/mtr932:/data alpine ls /data
Documents

Which is extremely strange because there are of course far more files and folders in C:\Users\mtr932 than just the Documents folder.

As a temporary workaround I will just put folders I want to volume mount in the root of C: but it would be ideal to be able to use the folders within my actual windows home directory.

I have tried setting "Unidentified networks" to "Private" as per this forum post but that did not help in my case.

Diagnostic id: FCAFD1CA-0D4C-4CB3-BE10-9C0731BB8E58/2016-08-08_16-47-24

@rn rn added the area/mounts label Aug 15, 2016

@rn

This comment has been minimized.

Copy link
Contributor

commented Aug 17, 2016

Thanks for all the reports and details. We have just released Beta23, which has significant fixes to the way the volume mounts are implemented. It would be great if you could try it and report back if it fixes the issue with volume mounts.

You can download the Beta from here: https://download.docker.com/win/beta/InstallDocker.msi

Thanks
Rolf

@technivore

This comment has been minimized.

Copy link

commented Aug 17, 2016

I have uninstalled the stable and installed the new beta and I still have the same problem. In fact it now appears to be worse because I cannot mount any folders at all, whereas before I could at least mount folders in the root of my C: drive.

I have tried a local administrator account (with a simple alphanumeric password), my domain account (in domain\username format), and my domain account in just username format. My domain account does have a comma in its password.

There's definitely something strange going on with the mounts though because if I mount e.g. C:/Users, the docker container sees nothing. And if I then mount C:/Users/username, it also sees nothing. BUT if I then go back and again mount C:/Users, it will list username as a subdirectory. So just the fact of attempting to mount it previously -- even though it didn't mount correctly and its contents couldn't be seen in the container -- made it appear at least as a directory name upon subsequent mounts of its parent directory.

Diagnostic id: FCAFD1CA-0D4C-4CB3-BE10-9C0731BB8E58/2016-08-17_09-33-14

@rn

This comment has been minimized.

Copy link
Contributor

commented Aug 17, 2016

@technivore Beta23 should support spaces, and pretty much any character from UTF-8 range (that was the fix mentioned in the changelog). So unfortunately, there still seems to be another issue.

There isn't anything strange happening in the sense, that the subdirectories are there as mountpoints from the previous volume share. So if you first to -v C:\:/tmp and it fails, then -v C:\Users:/tmp and it fails, and then again -v C:\:/tmp you'll see an empty Users directory in you container. Confusing....but normal, i think.

I had a look at your logs and see in the Linux VM:

Aug 17 14:27:55 moby kern.notice kernel: Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
Aug 17 14:27:55 moby kern.err kernel: CIFS VFS: Send error in SessSetup = -13
Aug 17 14:27:55 moby kern.err kernel: CIFS VFS: cifs_mount failed w/return code = -13

do you maybe have non-default authentication, like kerberos, enabled?

@technivore

This comment has been minimized.

Copy link

commented Aug 17, 2016

@rneugeba I don't know of any non-default authentication set up on my system. File and printer sharing is enabled for private networks but other than that I don't know what to look for. I'm on Win10 enterprise and joined to a domain. Please let me know what I can do to help troubleshoot; I really want to get this working and not have to go back to Docker Toolbox!

@rn

This comment has been minimized.

Copy link
Contributor

commented Aug 17, 2016

@technivore thanks for getting back. domains users is one of the things we don't test regularly as we don't have AD setup (we do now test with strange passwords, live accounts etc). Look like I have to bite the bullet and set up AD somewhere soon.

@technivore

This comment has been minimized.

Copy link

commented Aug 17, 2016

@rneugeba According to the mount.cifs man page there is a separate domain argument. Maybe the sharing credentials form needs to prompt for the (optional) domain or at least parse it out of the username input (if specified as domain\username or username@domain) and specify it in the mount command?

@rn

This comment has been minimized.

Copy link
Contributor

commented Aug 17, 2016

@technivore we do parse and handle the domain and username part and pass it to the CIFS mount. Also, AFAIK, we have user with domain accounts where it is working.

@technivore

This comment has been minimized.

Copy link

commented Aug 17, 2016

Just a further update, if I specify the credentials in domain\username format for my local user (that is, machine-name\username) then I can once again mount volumes outside C:\Users at least. Thank you for your attention on this issue.

@technivore

This comment has been minimized.

Copy link

commented Aug 17, 2016

Another update: I explicitly granted full access for the local administrator user to my domain account's home directory (C:\Users\mtr932), rather than just relying on the fact that the local administrators group should have had full access. And now it works -- using local administrator credentials (in machine-name\username format), and explicitly granting that user full access to my user directory, I can now mount volumes within my user directory and see them within the container.

@rn

This comment has been minimized.

Copy link
Contributor

commented Aug 17, 2016

Hi Mathew, thanks for the info. Glad that you got unblocked. I'll close this issue for now, but update our internal tracking issue for AD users with the info you provided. We certainly should provided a smoother experience for these scenarios.

@kcd83

This comment has been minimized.

Copy link

commented Apr 2, 2018

Some VPN's are configured to block access to local network and/or local VMs which includes Moby Linux.

Random question, is there a CLI way to open the "Shared Drives dialog" and prompt the user to update their password to get samba sharing working again?

@londoncalling

This comment has been minimized.

Copy link

commented Apr 3, 2018

@kcd83 you might be able to use the net share command (e.g., see Net share command: List / create / delete network shares from command line).

And just for reference, here are some relevant Docker Docs topics on shared drives, which I assume you've already looked at:

@joaofnfernandes, @friism, @FrenchBen any thoughts?

@kcd83

This comment has been minimized.

Copy link

commented Apr 4, 2018

Thanks for the reply. That would be outside the docker UI so a little confusing.

I'm just thinking a command I can tack on to the end of a PowerShell script we have to update IIS apppool credentials when people have to change their password every 3 months. But ideally just leverage the existing UX because your team does a great job at making shares work without any knowledge of the samba share hackery required to make it all work.

@londoncalling

This comment has been minimized.

Copy link

commented Apr 6, 2018

@kcd83 Sorry for not getting back sooner. I see what you are saying. Someone should be able to address this, maybe @tiborvass @thaJeztah @crosbymichael ?

@thaJeztah

This comment has been minimized.

Copy link
Member

commented Apr 6, 2018

@londoncalling I guess this is more an enhancement for Docker for Desktop (but not too familiar in that area); @gtardif ?

@ctliv

This comment has been minimized.

Copy link

commented Apr 15, 2018

I hope to leave an useful advice. I have Windows 10 notebook with domain account. Docker version is "18.03.0-ce, build 0520e24". I had the issue of empty mount volumes. Restarting containers or even docker engine did not solve.

After googling and checking the above thread, I realized that I changed the password of the domain account (with a special character, BTW) since last time I stopped the containers.

I ensured the containers were stopped, opened docker settings, selected "Shared Drives", removed the tick on "C" and added it again. Docker asked for the Windows account credentials and I entered the new ones. After that and starting containers, mount volumes were ok. Problem solved.

Then I noticed the link "Reset credentials..." at the bottom of the "Shared Drives", which I think plays the same role as unticking and reticking shared drive checkboxes.

So, to summarize, after a (domain or local) Windows account password change, mount volumes do not work anymore because Docker engine connects using older credentials, which must then be reset in Docker "Shared Drives" settings.

I hope to save some googling/stackowerflowing to anyone who manages to get here...

@helmesjo

This comment has been minimized.

Copy link

commented Apr 18, 2018

@ctliv Thank you sir!

I had this same issue a long time ago (the company force password change every 6 months or something), but that was enough time for me to totally forget about this specific issue & solution... :)

Would be wonderful if docker could (at some convenient time) verify & highlight authentication issues.

@kcd83

This comment has been minimized.

Copy link

commented Apr 23, 2018

... so if the same cli could also check if the current samba creds were still valid that would be awesome. But harder.

@emeric254

This comment has been minimized.

Copy link

commented May 16, 2018

This issue can appear using a domain attached account when unplugged from the company network before starting docker.

  • In case a domain account is already downloaded on the pc and the pc is not connected to the company network, giving this account credentials to share a drive seems to work but the drive appear empty.

  • This error can appear again if you plug a new device while the pc is disconnected from the company network. Then you have to disconnect this new device and plug the network before connect it again.

  • Having the company network available at all time or at least when docker start and when docker (re)mount drives solve the issue.

Having a local user should have fixed the issue but it's not possible on this pc because of the company security policy.

@rainabba

This comment has been minimized.

Copy link

commented Oct 6, 2018

FWIW, In my experience with WSL/Docker, this happens to me when a folder exists in my src (copied in to workdir with COPY), and then I try to mount a volume to a folder that then exists in the container storage.

@kgonia

This comment has been minimized.

Copy link

commented Oct 25, 2018

I had same issue after changing password in windows - after reset docker credentials it's working again

@lifeiscontent

This comment has been minimized.

Copy link

commented Nov 20, 2018

seems this doesn't work using ubuntu + bash for windows 10

@DungLai

This comment has been minimized.

Copy link

commented Dec 9, 2018

Docker Toolbox doesn't have Share Drive option. Changing the shared folder inside docker toolbox setting doesn't work.

@lucasbasquerotto

This comment has been minimized.

Copy link

commented Dec 10, 2018

@DungLai From what I see, when using docker run -v with Docker Toolbox you use de path of the folder in the VM, not in your OS.

In my case Docker Toolbox created a VM named default in Virtualbox and I added the Shared Folder in the VM; Virtualbox -> default (VM) -> Settings -> Shared Folders -> Add

Then you can specify the paths in both your machine and the mapped path in the VM, like:

  1. The 1st field is the path in your machine, like D:\my\app
  2. The 2nd is the path in the VM, like /my-vm/app
  3. Choose to Mount Automatically

(you can choose other paths too)

Restart the VM and then you can map volumes between the VM and the container like:

docker run -v /my-vm/app:/my-container/app alpine ls -la /my-container/app/

And you can access the folder inside your container using the path /my-container/app, like in the example above (you can change this path in the volume mapping).

Of couse, you can also map your entire partition, like D: to /d and access D:\some\path in your VM with /d/some/path (and use the later path when mapping volumes in docker run).

@DungLai

This comment has been minimized.

Copy link

commented Dec 12, 2018

Hi @lucasbasquerotto Thank you for your comment, the entire partition works for me, but my problem was that my folder is empty when mounted. This seems like a problem that lots of people share.

@DungLai

This comment has been minimized.

Copy link

commented Dec 12, 2018

Is there any way to reset credentials in docker toolbox?

@rodrigotolledo

This comment has been minimized.

Copy link

commented Dec 19, 2018

I’m having exact same issue as mentioned by @DungLai above.

I’m using Windows 10 Home with Docker Toolbox.

After mounting, container’s directory is empty (actually, for some weird reason it only shows my package.json file)

Also looking for a way to reset credentials in Docker Toolbox...

@dpollastrini

This comment has been minimized.

Copy link

commented Jan 10, 2019

This reset-your-credentials-to-make-dfw-happy workaround is pretty obscure and likely not practical for people that have Windows domain group policies that require strict password conventions. As this issue appears to be closed here, is anyone aware of a long-term solution being referenced somewhere (even if merely a work in progress)?

@rainabba

This comment has been minimized.

Copy link

commented Jan 10, 2019

One of the issues I had when learning, was to try and mount a volume in my container, but then have a folder that conflicted. For example, I'd make my workingdir /foo/bar, then try to use a volume for /foo/bar/private as well, BUT already have a folder called private in my initial mount. I would see no error, but I'd see the first folder and not my 2nd volume. You might ask how one would end up in such a crazy scheme. Well let me tell you.... It starts with migrating a legacy app which didn't use environment vars...

No really; during development, I would mount my project to /usr/src, THEN mount my config folder to /usr/src/private. Depending on whether I was working in WSL directly (like when the IO bug wasn't preventing NPM from working) or inside a container, that private folder may actually exist in my project and so when I mounted, it would already be there and I wouldn't see my intended private mount.

That behavior, with no errors, can lead to behaviors which are VERY hard to debug.

I'm with everyone else on resetting credentials also of course. I find that to be twice as hard if you're logging into Windows 10 using microsoft credentials, because if you change the password with MS or at your PC, you THEN have to sync them before being able to do many things (like resetting credentials for Docker in my experience). If you need to do that "resync", check this out: force-refresh-sync-of-microsoft-account-password

@Gordiievskyi

This comment has been minimized.

Copy link

commented Mar 11, 2019

I am not sure if that happen frequently. After I changed domain password I didn't enter new creds in opened window( cause it doesn't say which app requires it). So I had same issue. After I reset drive C shearing and entered new creds everything works fine

@matthewbloch

This comment has been minimized.

Copy link

commented Apr 5, 2019

I think #2151 is more relevant for anyone struggling to mount Windows Services For Linux paths under Docker. I hadn't seen anyone else cross-reference it.

@Sparkblender

This comment has been minimized.

Copy link

commented May 2, 2019

I had a similar problem after installing Docker Toolbox on Windows 7.
In my case, I missed creating a shared drive within VirtualBox.
This post helped me to resolve the issue:
Fixing Volumes in Docker Toolbox

@dzek69

This comment has been minimized.

Copy link

commented Jun 26, 2019

I had the same problem. It was working just fine previously, but then all volumes were empty. I had sharing my drive to docker enabled. I restarted docker. I had no special characters in my windows password

BUT

few hours ago I connected my local Windows 10 account with Microsoft accout, therefore I changed my password (while docker was closed IIRC)

This was causing the issue.

So if you recently changed your windows password - make sure to first uncheck sharing drives, APPLY, check drives again, apply again.

It started to work again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.