Bind mounts from docker-compose not working

Expected behavior

/var/www in my container points to C:\Users\ME\Development\laravel-drydock\laravel

Actual behavior

ERROR: for webapp rpc error: code = 2 desc = “oci runtime error: could not synchronise with container process: not a directory”


I’ve been having constant issues with getting bind mounts from Windows->Docker VM->Containers for almost the past year. This seems to be a continuation of that. It seems like either the mount from Windows->VM isn’t happening, or the paths sent to the docker daemon from the Windows client are wrong.

Steps to reproduce the behavior


Enter into the root of the project and run docker-compose up.

You’ll be able to see this error right away.

I am experiencing the same issue.

Same here.

Windows 10

+1 Also on Windows 10

I have encountered the same issue with Docker for Mac. I believe this is due to only certain paths being accessible for mounting (like the user directory), so instead docker searches for the path inside of the container VM and when it’s not found creates a blank directory at the path and attempts to mount that instead.

Related report over on the Mac forum: Unable to mount directories/files from `docker-compose` (oci runtime error … not a directory)


 Containers: 37
 Running: 6
 Paused: 0
 Stopped: 31
Images: 25
Server Version: 1.10.3
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: zfs
 Dirs: 234
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
 Volume: local
 Network: null host bridge
Kernel Version: 4.4.0-21-generic
Operating System: Ubuntu 16.04 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.52 GiB
Name: xps15
WARNING: No swap limit support