nanobox icon indicating copy to clipboard operation
nanobox copied to clipboard

Windows 10 - Mount denied - Docker Native

Open dakotalightning opened this issue 5 years ago • 12 comments

I can't seem to get nanobox to run. I've tried moving it to a new drive, home folder. Nothing seems to work. I can confirm it works fine on my MBP.

Windows 1803 build 17134.285 Hyper-V 10.0.17134.81

C:\dev\space>nanobox run
Preparing environment :

--------------------------------------------------------------------------------
+ HEADS UP:
+ This is the first build for this project and will take longer than usual.
+ Future builds will pull from the cache and will be much faster.
--------------------------------------------------------------------------------


Building runtime :
  - Starting docker container :


Error   : Error response from daemon: Mount denied:
The source path "C:/Users/Dakota Lightning/.nanobox/share/73deabdbb7f8d2747408ad4fa3bbf00c/engine"
doesn't exist and is not known to Docker
Context : failed to build the code -> failed to start docker container
  | Starting docker container :

nanobox.log

2018-09-15 11:49:22 ERROR code:Build:docker.CreateContainer({ID: Network:host NetName: Name:nanobox_73deabdbb7f8d2747408ad4fa3bbf00c_build Labels:map[] Hostname: Domainname: Cmd:[] Env:[] Image:nanobox/build IP: Binds:[C:/dev/koda-space:/app C:/Users/Dakota Lightning/.nanobox/share/73deabdbb7f8d2747408ad4fa3bbf00c/engine:/share/engine nanobox_73deabdbb7f8d2747408ad4fa3bbf00c_build:/mnt/build nanobox_73deabdbb7f8d2747408ad4fa3bbf00c_deploy:/mnt/deploy nanobox_73deabdbb7f8d2747408ad4fa3bbf00c_cache:/mnt/cache] Memory:0 MemorySwap:0 Status: CPUShares:0 RestartPolicy:no RestartAttempts:0 Ports:[]}): Error response from daemon: Mount denied:
The source path "C:/Users/Dakota Lightning/.nanobox/share/73deabdbb7f8d2747408ad4fa3bbf00c/engine"
doesn't exist and is not known to Docker
2018-09-15 11:49:22 ERROR Error response from daemon: Mount denied:
The source path "C:/Users/Dakota Lightning/.nanobox/share/73deabdbb7f8d2747408ad4fa3bbf00c/engine"
doesn't exist and is not known to Docker
2018-09-15 11:49:22 ERROR goroutine 1 [running]:
runtime/debug.Stack(0xc0421320c0, 0xb5, 0x0)
	/home/travis/.gimme/versions/go1.9.linux.amd64/src/runtime/debug/stack.go:24 +0xae
github.com/nanobox-io/nanobox/util.Err.log(0x0, 0x0, 0xc0421320c0, 0xb5, 0x0, 0x0, 0xe57358, 0x0, 0x0, 0x0, ...)
	/home/travis/gopath/src/github.com/nanobox-io/nanobox/util/error.go:38 +0xe5
github.com/nanobox-io/nanobox/util.ErrorQuiet(0xde44a0, 0xc0421a2010, 0x463849, 0x2)
	/home/travis/gopath/src/github.com/nanobox-io/nanobox/util/error.go:95 +0x244
github.com/nanobox-io/nanobox/util.Error(0xde44a0, 0xc0421a2010, 0x0, 0x0)
	/home/travis/gopath/src/github.com/nanobox-io/nanobox/util/error.go:105 +0x60
github.com/nanobox-io/nanobox/util.ErrorAppend(0xde44a0, 0xc0421a2010, 0xac6a99, 0x20, 0x0, 0x0, 0x0, 0x2e, 0x0)
	/home/travis/gopath/src/github.com/nanobox-io/nanobox/util/error.go:128 +0x385
github.com/nanobox-io/nanobox/processors/code.Build(0xc04231e0b0, 0x0, 0x0)
	/home/travis/gopath/src/github.com/nanobox-io/nanobox/processors/code/build.go:41 +0x858
github.com/nanobox-io/nanobox/processors.Build(0xc04231e0b0, 0x0, 0x0)
	/home/travis/gopath/src/github.com/nanobox-io/nanobox/processors/build.go:30 +0x9b
github.com/nanobox-io/nanobox/commands.buildFn(0xe2b200, 0xc0422b85c0, 0x1, 0x1)
	/home/travis/gopath/src/github.com/nanobox-io/nanobox/commands/build.go:45 +0x4e
github.com/nanobox-io/nanobox/commands/steps.Run.func1(0xe2b200, 0xc0422b85c0, 0x1, 0x1)
	/home/travis/gopath/src/github.com/nanobox-io/nanobox/commands/steps/run.go:19 +0x122
github.com/nanobox-io/nanobox/vendor/github.com/spf13/cobra.(*Command).execute(0xe2b200, 0xc0422b85b0, 0x1, 0x1, 0xe2b200, 0xc0422b85b0)
	/home/travis/gopath/src/github.com/nanobox-io/nanobox/vendor/github.com/spf13/cobra/command.go:561 +0x422
github.com/nanobox-io/nanobox/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xe28600, 0xc04219be60, 0xc04219be68, 0xffffffffffffffff)
	/home/travis/gopath/src/github.com/nanobox-io/nanobox/vendor/github.com/spf13/cobra/command.go:656 +0x36f
github.com/nanobox-io/nanobox/vendor/github.com/spf13/cobra.(*Command).Execute(0xe28600, 0xae2c68, 0x0)
	/home/travis/gopath/src/github.com/nanobox-io/nanobox/vendor/github.com/spf13/cobra/command.go:615 +0x32
main.main()
	/home/travis/gopath/src/github.com/nanobox-io/nanobox/main.go:121 +0x47d

docker

Client:
 Version:           18.06.1-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        e68fc7a
 Built:             Tue Aug 21 17:21:34 2018
 OS/Arch:           windows/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.1-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       e68fc7a
  Built:            Tue Aug 21 17:29:02 2018
  OS/Arch:          linux/amd64
  Experimental:     false

nanobox config

{
  "provider": "native",
  "ci-mode": false,
  "ci-sync-verbose": false,
  "mount-type": "native",
  "netfs-mount-opts": "mfsymlinks",
  "cpus": 1,
  "ram": 1,
  "disk": 102400,
  "external-network-space": "192.168.99.50/24",
  "docker-machine-network-space": "172.21.0.1/16",
  "native-network-space": "172.20.0.1/16",
  "ssh-key": "default",
  "ssh-encrypted-keys": false,
  "anonymous": false,
  "lock-port": 12345
}

dakotalightning avatar Sep 15 '18 19:09 dakotalightning

I suspect the space in the path is interfering with Docker's mounting logic. Try a user account without a space in its name...

danhunsaker avatar Sep 15 '18 20:09 danhunsaker

Thanks for the suggestion, I've tried that.

I can't seem to figure this out.

Preparing environment :

--------------------------------------------------------------------------------
+ HEADS UP:
+ This is the first build for this project and will take longer than usual.
+ Future builds will pull from the cache and will be much faster.
--------------------------------------------------------------------------------


Building runtime :
  / Starting docker container :


Error   : Error response from daemon: Mount denied:
The source path "C:/Users/Koda/.nanobox/share/73deabdbb7f8d2747408ad4fa3bbf00c/engine"
doesn't exist and is not known to Docker
Context : failed to build the code -> failed to start docker container
  / Starting docker container :

dakotalightning avatar Sep 16 '18 20:09 dakotalightning

I have the same issue, can't get Nanobox to work.

TomDeSmet avatar Sep 27 '18 18:09 TomDeSmet

I'm also having the same issue.

ishu3101 avatar Oct 13 '18 04:10 ishu3101

As am I.

emiljohnsen avatar Oct 15 '18 11:10 emiljohnsen

Yes, me too :(

CameronHall avatar Nov 26 '18 01:11 CameronHall

I'm having the problem too.

Fredegaard avatar Dec 13 '18 19:12 Fredegaard

Same issue.

lunacd avatar Dec 27 '18 09:12 lunacd

same

fsecada01 avatar Dec 27 '18 14:12 fsecada01

I had the same issue, but managed to find a workaround that seems to be working.

From the error message:

Building runtime :
  / Starting docker container :


Error   : Error response from daemon: Mount denied:
The source path "C:/Users/erik/.nanobox/share/73deabdbb7f8d2747408ad4fa3bbf00c/engine"
doesn't exist and is not known to Docker
Context : failed to build the code -> failed to start docker container
  / Starting docker container :

we see that it complains that some source path doesn't exist, so I decided to create it myself:

cd ~/.nanobox/share
mkdir 73deabdbb7f8d2747408ad4fa3bbf00c
cd 73deabdbb7f8d2747408ad4fa3bbf00c
touch engine

After forcing this (empty) engine file, the problem seems to go away. Interestingly, the file remains empty after a nanobox operation (in my case deploy).

If you have any idea why this works, or see any risks with this approach, please let me know!

erikvalkering avatar Jan 04 '19 13:01 erikvalkering

I had the same issue, but managed to find a workaround that seems to be working. If you have any idea why this works, or see any risks with this approach, please let me know!

This works cause folder wasn't exist. There is another good question - why this folder were not created automatically

Hellek avatar Mar 15 '19 12:03 Hellek

I had the same issue, but managed to find a workaround that seems to be working. If you have any idea why this works, or see any risks with this approach, please let me know!

This works cause folder wasn't exist. There is another good question - why this folder were not created automatically

God, u save my day @Hellek ! Same issue and i thought that the destination folder would be created automatically...

dnguyen07 avatar Mar 28 '19 10:03 dnguyen07