Search code examples
macosdockerdocker-composefile-sharingdocker-desktop

Docker : The export path does not exist on OS X


I'm trying to build a remote project using docker. I have cloned the project using git and then used the command docker-compose up -d to run containers.

Then I'm getting this error.

ERROR: for audio  Cannot start service audio: b'Mounts denied: \r\nThe paths /data/googleappcred and /data/.aws\r\nare not shared from OS X and are not known to Docker.\r\nYou can configure shared paths from Docker -> Preferences... -> File Sharing.\r\nSee https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.\r\n.'

ERROR: for postgres  Cannot start service postgres: b'Mounts denied: \r\nThe path /data/postgres\r\nis not shared from OS X and is not known to Docker.\r\nYou can configure shared paths from Docker -> Preferences... -> File Sharing.\r\nSee https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.\r\n.'

ERROR: Encountered errors while bringing up the project. 

enter image description here

As it suggests I tried to configure following paths through Docker->Preferences

/data/postgres  
/data/googleappcred   
/data/.aws

but I'm getting this error.

The export /data/postgres/ path does not exist on OS X

enter image description here

These are the folders that currently listed under docker file sharing.

enter image description here

I tried few other alternative workarounds suggested by other developers but nothing could resolve my issue. Any help is appreciated.


Solution

  • I resolved my issue by following these steps.

    1. Create a directory by the name data in the root (~/data/)
    2. The configure following paths through Docker->Preferences
      /data/postgres
      /data/googleappcred
      /data/.aws

    The issue has occurred because there was no data folder at the system root.