I have search for a similar problem as mine but haven\'t found a good solution for it. I\'m trying to set up my enviroment.
The first thing we have to set up is
Having a similar problem (also using an AzureAD account on Windows), I could get it working by creating another non-administrator user with a different name, as well.
When the Docker user is no administrator, you need to give access to required folders individually. I noticed that you need to include their parent directories, up to your home directory.
That is, if you want to give access to C:/Users/You/Projects/Acme/ShareThis
, you need to add two permissions:
C:/Users/You/Projects
, the docker user needs only List directory permission. This will be inherited to all subfolders and -files, including Acme
.C:/Users/You/Projects/Acme/ShareThis
needs either full or read-only access, depending on your needs.You can set those permissions by right-clicking a directory, then Properties > Security tab > Edit button > Add... button. Enter the name of the docker user, press OK. Exit with OK.
Furthermore, make sure that the accessed files are not encrypted by Windows' EFS (Encrypting File System), Docker can't recognize them. However, this led to a slightly different error for me, during docker run
launch:
cp: can't open '/directory/./file': Permission denied
I have found a fix it is to create a new users account which is the same username as your AzureAD account, but without the AzureAD prefix. Now it's working!
https://tomssl.com/2018/01/11/sharing-your-c-drive-with-docker-for-windows-when-using-azure-active-directory-azuread-aad/