11

Steps to reproduce are very easy.

Create a Dockerfile.

My Dockerfile has many more lines, but I have trimmed them so we can focus in the source of the problem.

Said that, these two lines alone (without anything more) show the problem.

FROM microsoft/iis
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; $VerbosePreference = 'Continue'; "]

Run docker build . and you get hcsshim::PrepareLayer - failed failed in Win32: Función incorrecta. (0x1).

Windows 10 Pro 1909 (but it happened too in 1903)

Docker version: 2.1.0.5

Engine: 19.03.5

Machine: 0.16.2

2
  • I tried with same version and its working for me
    – Diego B
    Jan 2, 2020 at 16:16
  • 1
    Only happens if you have an application that uses cbfsconnect2017.sys. Probably you don't have any application that uses it @Diego Baranowski
    – Javier
    Jul 9, 2020 at 9:26

4 Answers 4

17

I have found the solution to the problem.

Reading all the https://github.com/docker/for-win/issues/3884 bug, some have found a simple solution: rename C:\windows\system32\driver\cbfsconnect2017.sys so it isn't loaded the next boot.

Disabling that driver enables me to do a docker build for the first time in windows containers in almost a year.

In my case Box Sync was the one using that driver.

EDIT: @GustavoTM have found that pCloud raises the same problem. EDIT2: @VonC have noticed that some people in the issue in GitHub has solved it deleting this other file: C:\Windows\System32\drivers\cbfs6.sys. I haven't tried that, but i put it if it helps others.

The good thing is that I don't need to uninstall Box, but only rename that file.

8
  • 1
    After working for months without any problem with Docker for Windows, yesterday I decided to install a storage cloud application and I started to get this issue, after removing the application and renaming the file cbfsconnect2017.sys the issue disappeared. Thanks for the information!
    – GustavoTM
    Jun 25, 2020 at 13:57
  • 2
    the cloud application was pCloud
    – GustavoTM
    Jul 13, 2020 at 15:58
  • 1
    See also, from github.com/docker/for-win/issues/3884#issuecomment-694787557, deleting C:\Windows\System32\drivers\cbfs6.sys.
    – VonC
    Sep 19, 2020 at 14:14
  • 1
    This worked for me. I just renamed cbfs6.sys and rebooted. However, I have to say that Docker or Microsoft need to do better here. This is a dreadful bug with an unacceptable workaround.
    – TrojanName
    Jan 12 at 18:58
  • 1
    Pay attention, if you use Amazon Workdocs Drive it will stop working when you rename cbfsconnect2017.sys, see repost.aws/questions/QUlJQ4_taSTriGTehsFCmFjg/… Jun 15 at 16:07
2

This is still an issue (still open) with Win10. Looks like uninstalling cloud storage providers with file system filters like Dropbox, Box, etc. as a workaround is an option for some users.

Deinstall cloud storage providers or virus scanners; if you identify which one is not working please share in https://github.com/docker/for-win/issues/3884

3
  • I use several cloud drives (Google Drive, DropBox, Box and OneDrive).
    – Javier
    Jan 3, 2020 at 8:15
  • I have tried to shutdown them and it seems it's not enough. Uninstalling them would be a problem for me now.
    – Javier
    Jan 3, 2020 at 8:26
  • 4
    The whole idea behind docker is that it should avoid conflicts like this. Very odd. Jul 9, 2020 at 7:21
1

In my case was the problem similar but the file cbfs6.sys was placed somewhere in the rest of uninstalled application Jungle disk, somewhere in the folder c:\Program files\Jungle disk .... It's part of Callback File System signed by EldoS Corporation.

The folder could be rename only and not delete directly. So I could delete its immediately after the PC restart, before running the Docker. So it could be delete during the Docker service restart too.

1

For me the problem was the driver "cbfsconnect2017.sys" which map an NT disk from SFTP. When I have stopped the mapping tool (SFTP Net Drive 2017) the problem was disappear ;) Thanks for all contributors

1

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.