Mathieu Ract
Mathieu Ract

Reputation: 501

Docker : Error response from daemon: user declined directory sharing

While trying to run this command :

docker-compose up

I get this error :

Error response from daemon: user declined directory sharing C:\Users\path_to_my_folder

I am working on windows 10

Upvotes: 49

Views: 41485

Answers (5)

KarthikaSrinivasan
KarthikaSrinivasan

Reputation: 599

If you have missed the notification or want to add any file or delete existing shared file path, go to Settings -> Resources -> File Sharing -> Use the +/- button -> Click Apply and Restart

enter image description here

Upvotes: 1

mcxcr
mcxcr

Reputation: 5

Answer from Kamran Huseyn worked for me perfectly on windows (this issue is not observed in my MacOS terminal).

Open Docker and follow this -> settings ->Resources -> FileSharing. Add required folder and hit Apply & Restart!

Upvotes: -2

Kamran Huseyn
Kamran Huseyn

Reputation: 79

Open Docker and follow this -> settings ->Resources -> FileSharing. Add required folder and hit Apply & Restart

Upvotes: 7

Benoit Blanchon
Benoit Blanchon

Reputation: 14541

Normally, Docker will display a desktop notification asking for your confirmation before sharing the folder.

Docker sharing confirmation notification

However, if notifications are disabled (for example, if you enabled Focus Assist), the confirmation box won't show and Docker will automatically decline the permission.

Upvotes: 14

Stefan Vukovic
Stefan Vukovic

Reputation: 1135

You have to add C:\Users\path_to_my_folder to Docker Filesharing. Go to docker dashboard -> settings ->Resources -> FileSharing. Add required folder and hit Apply & Restart.

Upvotes: 89

Related Questions