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

Cannot mount file using windows containers #2089

Closed
2 tasks done
yorek opened this issue Jun 7, 2018 · 6 comments
Closed
2 tasks done

Cannot mount file using windows containers #2089

yorek opened this issue Jun 7, 2018 · 6 comments

Comments

@yorek
Copy link

yorek commented Jun 7, 2018

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID: C2FF7C1C-4DF5-40AF-B21C-3113905AEC6E/2018-06-06_22-23-33

Expected behavior

Correctly mount a folder

Actual behavior

The following error:

C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: container 08cc92221f972fd07eee007cc345c6818c25034b8cfe68e4522b4460e3f667a9 encountered an error during CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) extra info: {"CommandLine":"-v D:\\Temp:c:\\Temp","User":"ContainerUser","WorkingDirectory":"C:\\","Environment":{"PSCORE":"C:\\Program Files\\PowerShell\\pwsh.exe","ProgramFiles":"C:\\Program Files"},"EmulateConsole":true,"CreateStdInPipe":true,"CreateStdOutPipe":true,"ConsoleSize":[38,184]}.

Information

  • Windows Version: 10 Pro, 1803
  • Docker for Windows Version:

Client:
Version: 18.03.1-ce
API version: 1.37
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:12:48 2018
OS/Arch: windows/amd64
Experimental: false
Orchestrator: swarm

Server:
Engine:
Version: 18.03.1-ce
API version: 1.37 (minimum version 1.24)
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:21:42 2018
OS/Arch: windows/amd64
Experimental: false

Steps to reproduce the behavior

  1. make sure you have a Temp folder in C:\ drive
  2. docker run -it microsoft/powershell:6.0.2-nanoserver -v C:\Temp:C:\Temp
@jasonbivins
Copy link

Hi @yorek
I was able to repro this, so i went ahead and reported it internally as a bug.

@yorek
Copy link
Author

yorek commented Jun 7, 2018

Great, thanks!

@rn
Copy link
Contributor

rn commented Jun 13, 2018

@yorek it looks like your command line slightly wrong. Specifically the volume mount argument need to be before the image name, something like:

docker run -it -v C:\Temp:C:\Temp microsoft/powershell:6.0.2-nanoserver 

works fine for me. With your command line you are basically passing -v C:\Temp:C:\Temp as an argument into the powershell container.

Closing this, but please report if the above does not work

@rn rn closed this as completed Jun 13, 2018
@yorek
Copy link
Author

yorek commented Jun 16, 2018

@rn you are totally right, using the -v option before the image it works nicely. I would say that there is a bug anyway...since the -v option, when used in the wrong sequence, still seems to be accepted and in fact the returned message is:

C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: container f263ceed47beb3eec16cac545486b2168fdb1f1591490615889364aeed95fe29 encountered an error during CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) extra info: {"CommandLine":"-v C:\\Temp:C:\\Temp","User":"ContainerUser","WorkingDirectory":"C:\\","Environment":{"PSCORE":"C:\\Program Files\\PowerShell\\pwsh.exe","ProgramFiles":"C:\\Program Files"},"EmulateConsole":true,"CreateStdInPipe":true,"CreateStdOutPipe":true,"ConsoleSize":[38,184]}.

that leads to the idea that the "system cannot find the file specifie" is realted to the -v option

@yorek
Copy link
Author

yorek commented Jun 16, 2018

Btw, thanks a lot for the help! :)

@docker-robott
Copy link
Collaborator

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.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants