0

I am trying to learn how to perform mount/volume using docker.

I tried the following command
docker run -it -v C:\temp:C:\temp --name "test" mcr.microsoft.com/windows/servercore:ltsc2019

The container is built and ran. However, i got the following error when i executed docker container exec 58df -it powershell

>container 58df300280ec39b4bbf1457cc9a44f60c523f91aa8d777a1ea53f8817d3c972a encountered an error during >CreateProcess: failure in a Windows system call: 
>The system cannot find the file specified. (0x2)
>[Event Detail:  Provider: 00000000-0000-0000-0000-000000000000]
>[Event Detail:  Provider: 00000000-0000-0000-0000-000000000000]
>[Event Detail: >onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(173)\vmcomputeagent>.exe!00007FF60B4BB397: (caller: 00
>007FF60B46E70B) Exception(3) tid(5e4) 80070002 The system cannot find the file specified.
>    CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess] 
>Provider: 00000000-0000-0000-0000-000000000000] extra info: {"CommandLine":"-it >powershell","User":"ContainerUser","WorkingDirectory":"/","Environment":>>>>{"powershell":"C:\\Windows\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell.exe"},"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,
"ConsoleSize":[0,0]}`

To make it worst, the command docker container exec 58df -it powershell will usually work and allow me to go into interactive mode for others container without using the volume and mount command. It seems i broke my docker ever since i ran this mount/volume command.

I tried:

  1. factory reset docker installation

  2. Use kitematic to add environment variable, see if i can link back the PowerShell command. add environment variable

But it doesn't work anymore. Will appreciate if there is any input from anyone who has faced something similar.

csamleong
  • 769
  • 1
  • 11
  • 24
  • https://github.com/docker/for-win/issues/2679 – Adiii Jan 05 '20 at 04:37
  • @Adiii i came across this line too, however, as i mentioned the same command used to work before i attempted mount/drive, thus, i dont think it is related to a syntax issues. – csamleong Jan 05 '20 at 05:16

2 Answers2

1

It was a silly mistake at my end. I managed to find out the problem. All the while i have been using PowerShell in Visual Studio Code to perform my docker commands, i did not know why was i using PowerShell ISE to execute into interactive mode. According to this link PowerShell ISE issue It is a known issue on PowerShell ISE, i tried it with PowerShell and it is working fine now.

csamleong
  • 769
  • 1
  • 11
  • 24
0

yes. power shell ISE does not work however windows power shell(x86) does

ayman.mostafa
  • 451
  • 6
  • 5