Docker volume mount windows container

2

I am getting the following error while trying to mount a volume in windows docker container.

===============
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: container 1234567ebcdh encountered an error during Start: failure in a Windows system call: The compute system exited unexpectedly. (0xc0370106)
================

I have mentioned almost all the possible combinations of c:/app in docker file but still getting error while starting the container itself without -v option.

-----------
FROM microsoft/windowsservercore
SHELL ["powershell", "-Command"]
WORKDIR /application
COPY . .
VOLUME C:/application
CMD cmd
-----------
  • OS: Windows 10
  • Docker: Docker for windows 2.0.0

If you have any idea what went wrong here?

docker
dockerfile
asked on Stack Overflow Mar 14, 2019 by jibin087 • edited Mar 14, 2019 by VonC

1 Answer

0

This seems to be followed with docker/for-win issue 676 which includes:

I was also having this exact issue:

docker: Error response from daemon: container XYZ encountered an error during Start: failure in a Windows system call: The compute system exited unexpectedly. (0xc0370106).

I found 2 solutions for my case:

I was able to successfully build and run the image by reducing the number of layers in the history. (For me this number happened to be a max of 37 layers in history.) (If your dockerfile is based on a 2nd dockerfile, you may need to reduce the number of steps in the 2nd dockerfile.)

  • How to debug: I was able to debug this by cutting the number of steps in half until the image ran, then re-adding steps until I discovered how many steps the history could have before breaking the image.
  • I was able to successfully build and run the image without reducing the number of layers by making sure that the root image was a certain version of windowsservercore:1709 (specifically, the 10.0.16299.904_en-us version of 1709, which does not appear to be pull-able anymore; however, it might also work with the latest version of windowsservercore:1709, I haven't tried).
    I didn't debug this, I discovered this by blind luck.

Note: the same issue reports that mounting can be problematic.

answered on Stack Overflow Mar 14, 2019 by VonC

User contributions licensed under CC BY-SA 3.0