Docker Community Forums

Share and learn in the Docker community.

Docker-compose on shared drive not working properly

Hello together

Please excuse me if this question was asked like a thousand times before, but I also read almost all of the thousand solutions and didn’t come to a solution yet. As I don’t want to be misled by a deprecated information I just go ahead and ask one more time.

I just bought a new laptop and for the convenience not cluttering my c drive I decided to give Docker Toolbox another chance to run on drive d

Installation seemed to go properly and my env variables also point to drive d

So i went ahead and pulled one of our companies app onto my laptop to start my work and got immediately interrupted by the following error:

D:\repositories\company_suite>docker-compose up
Removing company_suite_nginx_1
Starting company_suite_db_1 ... error
ERROR: for company_suite_db_1  Cannot start service db: OCI runtime create failed: container_linux.go:345: starting cont
ainer process caused "process_linux.go:430: container init caused \"rootfs_linux.go:58: mounting \\\"/d/repositories
/company_suite/docker/postgresql/pg_hba.conf\\\" to rootfs \\\"/mnt/sda1/var/lib/docker/overlay2/e653b8bcacb0e7cc13ea110
0d250fd1f785b46d64a1fc47dc9b09277ad205f1a/merged\\\" at \\\"/mnt/sda1/var/lib/docker/overlay2/e653b8bcacb0e7cc13ea11
00d250fd1f785b46d64a1fc47dc9b09277ad205f1a/merged/var/lib/postgresql/pg_hba.conf\\\" caused \\\"not a directory\\\"\
"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exist
s and is the expected type

ERROR: for db  Cannot start service db: OCI runtime create failed: container_linux.go:345: starting container proces
s caused "process_linux.go:430: container init caused \"rootfs_linux.go:58: mounting \\\"/d/repositories/company_suite/d
ocker/postgresql/pg_hba.conf\\\" to rootfs \\\"/mnt/sda1/var/lib/docker/overlay2/e653b8bcacb0e7cc13ea1100d250fd1f785
b46d64a1fc47dc9b09277ad205f1a/merged\\\" at \\\"/mnt/sda1/var/lib/docker/overlay2/e653b8bcacb0e7cc13ea1100d250fd1f78
5b46d64a1fc47dc9b09277ad205f1a/merged/var/lib/postgresql/pg_hba.conf\\\" caused \\\"not a directory\\\"\"": unknown:
Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the
 expected type
ERROR: Encountered errors while bringing up the project.

I made sure to properly mount my shared folder d /d in VirtualBox GUI
Additional I mounted it via VBoxManage:

VBoxManage setextradata default VBoxInternal2/SharedFoldersEnableSymlinksCreate/d 1

and via docker-machine ssh, /mnt/sda1/var/lib/boot2docker/profile:

sudo mount -t vboxsf -o uid=1000,gid=50 d /d

Previously I received an identical error for the nginx app in the docker-compose.yml which has now been replaced with the postgresql/pg_hba.conf just right after I upgraded VirtualBox to latest Version 6.0.1

Is there anything I forgot to set properly or why can’t I start my app from drive d?
Just to let you know, starting it from c/Users paths works just fine, as intended