Unable to change volume
djsowa opened this issue ยท 3 comments
Expected behavior
Allow to change volumes for docker image
Actual behavior
When trying to change the volume for mongo image I'm receiving an error:
Invalid directory - Please make sure directory exists and you can read/write to it
Information about the Issue
Kitematic(windows 8.1)
Steps to reproduce the behavior
- ...Run mongo image
- ...In image settings try to change the volume for /data/configdb
Using toolbox, only your home user folder is shared with the VM. If a different location is selected, you will not be able to use that folder with a folder.
thanks a lot (y)
In case anyone stumbles upon this answer, there is a workaround for Docker Toolbox on Windows. Normally, Docker Toolbox only provides volumes access to the user's home folder (e.g., C:/Users) and subdirectories.
The workaround is to add a shared folder to the Docker Virtualbox VM with the folder path as the folder you want to share and the mount point as where you want to access it in your Docker Compose file (see the image as reference).
You can then access this shared folder by referencing the mount point. For example, my Compose file has:
volumes:
- "/aifi/data/downloads:/app/data/downloads"
and I can access the files correctly.
Unfortunately, Kitematic does not correctly show the volume and it cannot be set in the program. It gives the same error as OP, Invalid directory - Please make sure directory exists and you can read/write to it.