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:
factory reset docker installation
Use kitematic to add environment variable, see if i can link back the PowerShell command.
But it doesn't work anymore. Will appreciate if there is any input from anyone who has faced something similar.