Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Net Use fails on Windows Nano Container to Azure File Share #1306
Net Use maps a drive to Azure File Share. I can't include the exact file share for security reasons, but I've provided as much as I can for it to be easily replicable.
PS C:> cmdkey /add:\MyFileShareName.file.core.windows.net /user:Username /pass:KeyInfo
The above error does not occur on the host (Host can reach share fine) but does occur on the container, both when running via dockerfile and when connecting to a container and running manually.
PS C:\DeployFiles> docker version
Steps to reproduce the behavior
Are you using Windows Server 1709?
1709 has been awash in issues each time I've attempted using it. For instance, when uploading a powershell script to run, it fails on running itself. So, haven't gotten far enough in 1709 to even attempt a persistent drive on it. (Omitted irrelevant results)
Step 8/10 : RUN powershell dir
There's no Powershell in 1709 nanoserver images:
Here's an example of building 1709 nanoserver based images: https://github.com/dotnet/dotnet-docker/blob/master/2.0/sdk/nanoserver-1709/amd64/Dockerfile
You can also get nanoserver 1709 images with PowerShell installed: https://hub.docker.com/r/microsoft/powershell/tags/
I haven't seen the error you're getting, maybe it's related to the user account: https://github.com/StefanScherer/dockerfiles-windows/blob/master/portainer/Dockerfile.1709#L6
A colleague and I recently ran into the same error with the “net use” command (System error 1783 has occurred. The stub received bad data.) with the WindowsServerCore image. Actually, any command we used to try and establish a connection to an internal network share would fail (i.e., equivalent powershell commands to “net use”).
On some machines/configurations it was working, on some it was not. After testing many permutations, we came to the conclusion it was due to this windows update: [https://support.microsoft.com/en-us/help/4041691/windows-10-update-kb4041691]
However, it appears one of the latest Windows updates resolves this issue. After applying all windows updates on the host machine, along with updating to the latest Microsoft/WindowsServerCore image, the issue is no longer occurring. It must be one of the following updates that fixes the issue:
Some additional information that might help:
It appears the solution is to:
Issues go stale after 90d of inactivity.
Prevent issues from auto-closing with an
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.