1
I’m having a problem when it comes time to perform the link mount on the Docker command:
docker run -p 5000:5000 -v "$(pwd)/path:/path conteiner_name
It turns out that the directory is not mounted in the container.
This is due to the directory returned from $(pwd)
which is from another partition on my operating system host. However, do the same procedure in the folder /Users
in OSX, it does the linking normally. My hard drive is divided into
SSD1 - Instalado o docker (S.O Host), boot2docker, etc
HDD1 - Contém os arquivos do conteiner, DockerFile, etc.
If I give the build to create the container on HDD1 and give the run, it will not fetch the directory through the $(pwd)/path:/path
, but if I move the same files to SSD1, it works perfectly.
Is it a permission thing? I read in the Docker documentation that, by default, folders can be shared /Users
, /etc
, /tmp
...
which version of Docker you are using I use this on mac (Version 17.03.1-ce-mac12 (17661) Channel: stable d1db12684b), in this version you have the option to add the shared folders in my case I added the folder /Volumes and I can normally use the volumes that are outside the default folders.
– thyagoluciano
Hello, I am using version 17.05.0-ce, which command to add the other folders?
– Rodrigo