5

I'm a beginner at docker trying to get it working on my Windows 10 machine using creator's update bash subsystem. My dockerfile builds fine on my mac, but when I try docker build from the same file on windows, I get errors like the following:

time="2017-08-28T14:44:36-07:00" level=error
msg="Can't add file \\\\?\\C:\\Users\\username\\Workspace\\...\\node_modules\\.bin\\nodemon
to tar: readlink \\\\?\\C:\\Users\\username\\Workspace\\...\\node_modules\\.bin\\nodemon:
The system cannot find the file specified."

This is printed out for all of my node_modules dependencies. My first question is: What is triggering this "add" operation for all of my node_modules? These error messages are printed out before the first line of my dockerfile is executed

Step 1/25 : FROM ubuntu:14.04

Second, does this issue have something to do with different paths in windows? To me, the weirdest part about the errors is the strange path \\\\?\\C:\\Users\\username. What is going on here with the excessive slashes and a question mark in the path?

Third, is it just me? Or does everyone encounter problems when using docker on windows bash subsystem?

NOTE: I've tried setting up the Docker Toolbox and running the quickstart terminal. I get the following error from running the quickstart terminal

Error with pre-create check:
"This computer is running Hyper-V. VirtualBox won't boot a 64bits VM when Hyper-V is activated. Either use Hyper-V as a driver, or disable the Hyper-V hypervisor. (To skip this check, use --virtualbox-no-vtx-check)"
Looks like something went wrong in step ´Checking if machine default exists
´... Press any key to continue...

So I've tried making sure hyper-v is enabled from this article here

NOTE 2: I've also made sure that my C drive is shared with my containers

Corey Cole
  • 2,262
  • 1
  • 26
  • 43
  • Can you post your Dockerfile for context? – Mano Marks Aug 28 '17 at 23:01
  • BTW this is useful: https://docs.docker.com/engine/reference/builder/#escape especially ```The escape character is used both to escape characters in a line, and to escape a newline. This allows a Dockerfile instruction to span multiple lines. Note that regardless of whether the escape parser directive is included in a Dockerfile, escaping is not performed in a RUN command, except at the end of a line. Setting the escape character to ` is especially useful on Windows, where \ is the directory path separator. ` is consistent with Windows PowerShell.``` – Mano Marks Aug 28 '17 at 23:02
  • @ManoMarks Here is a pastebin of my dockerfile https://pastebin.com/bhQ0JC8E But, like I said, it dumps all of these errors before it runs the first line `FROM ubuntu:14.04` – Corey Cole Aug 28 '17 at 23:12
  • @ManoMarks on the escape characters, they make sense for the file path, but not the beginning of the path where `\\\\?\\C:\\Users\\username` would escape to `\\?\C:\Users\username` – Corey Cole Aug 28 '17 at 23:17
  • Are you running in Linux container mode? – Mano Marks Aug 29 '17 at 00:25
  • The container I'm trying to spin up is Linux, not sure what you mean by "Linux container mode" where can I check that? – Corey Cole Aug 29 '17 at 00:43
  • I'm currently building it using powershell and it's going fine, so I think this may be an issue with the windows bash subsystem. Have you tried it using Powershell? Switching between linux and windows containers is detailed here: https://docs.docker.com/docker-for-windows/#switch-between-windows-and-linux-containers – Mano Marks Aug 29 '17 at 04:11
  • I have the same Problem, I can only reproduce it when using docker toolbox and a git directory structure with multiple submodules, After running some commands via the Ubuntu WSL shell. Once it starts doing it I have to remove the entire directory and clone again. Other projects seems to work fine. – Eaton Emmerich Apr 09 '18 at 14:10
  • @ManoMarks The issue is not related to escaped directories. Both pre-processor options give the same result. – Eaton Emmerich Apr 09 '18 at 14:18

0 Answers0