Docker Community Forums

Share and learn in the Docker community.

Docker for Windows: only some of the container folders are mounted correctly, other are empty


(Swisslog) #1

Hi,

I’ve built from own images based on centos:7 and created as well a user to run my application.
When I built the image, I copied configuration files to a folder called /home//config.
I’m running version 18.06.1-ce-win73.

If I try to mount it using -v c:\application\config:/home//config the folder is empty in the container and nothing is written to c:\application\config.

Example of things that I’ve tried

1: -v c:\application\config:/home//config
c:\application\config and /home//config are empty

2: -v c:\application:/home/
c:\application and /home/ contain a folder called config but the config folder is empty

I’ve tried to mount different directories as well like /usr/local or /usr/local/share or other directories that are created when my application is installed and it’s a hit and miss. Some directories are mounted correctly, others not!!!
I’ve shared the c: drive, reset credentials multiple times, tried with local admin user and my AD user and the behaviour is always the same.

Does anybody have any idea?! This is driving me nuts!