I'm using Docker Desktop vrs 2.1.1.0 (edge channel) on Mac Os Mojave. I need to include a file from /usr/local folder, as shared file in Docker's preferences, but the /usr folder is not displayed while browsing the folders. The option to write the folder/file name manually is also not available. See the print screens. Does anyone have a clue how to add those folders in preferences?
File sharing paths are not manually editable
Folders like /usr or /Volumes don't appear in folder browsing
Update
I need to share this actual folder: /usr/local/share/dotnet/sdk/NuGetFallbackFolde
and not entirely the /usr/local
as I wrote above. But as I'm not able to select at least the /usr
folder, this is why I've mentioned only the /usr/local
folder.
Update
I've downgraded progressively up to Docker Community Edition 2.0.0.3 2019-02-15
. That seems to be the last version with the old user interface. With this version the folder browser dialog from file sharing displays all the folders and also manual editing of the file paths works.
On versions Docker Desktop Community 2.1.0.1
and Docker Desktop Community 2.1.0.2
, which have the new UI, it doesn't work.
In order to share Windows folders with Docker containers, you first need to configure the "Shared Drives" option in Docker settings. Once the Shared Drives option is configured, you can mount any folder on shared drives with the "-v" (volume) flag.
Install and run Docker Desktop on MacDouble-click Docker.dmg to open the installer, then drag the Docker icon to the Applications folder. Double-click Docker.app in the Applications folder to start Docker.
Debian: /var/lib/docker/ Windows: C:\ProgramData\DockerDesktop. MacOS: ~/Library/Containers/com.
I have faced the same problem and could sort it out using the latest docker version.
You can edit ~/Library/Group Containers/group.com.docker/settings.json
.
Then add whatever path you need, in my case was a synthetic link (created through synthetic.conf), this way by manual editing the file the UI does not auto resolve the link so it works well.
{
"filesharingDirectories" : [
"\/Users",
"\/Volumes",
"\/datadrive",
"\/private",
"\/tmp"
],
In the File Sharing tab of Docker's Preferences, click the Add Directory button (+) and browse to the root directory of your Mac drive. Now press Command+Shift+Dot to show hidden directories. This will make the usr directory visible.
You will now be able to browse to the /usr/local/share/dotnet/sdk/NuGetFallbackFolder directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With