MatchbookLab / local-persist

Create named local volumes that persist in the location(s) you want
MIT License
851 stars 122 forks source link

Running local-persist from within a container on Windows 10 #65

Open devopsn opened 5 years ago

devopsn commented 5 years ago

I have Docker set up on my Windows 10 laptop. I am trying to run local-persist from within a container as described here - https://github.com/CWSpear/local-persist#running-from-within-a-container-aka-running-on-mac-or-windows

  1. I am able to run the command "docker run -d \" as specified in section "Running from Within a Container (aka Running on Mac or Windows)"
  2. The command executes successfully
  3. Then I run "docker volume create -d local-persist ....." as specified in section - "Usage: Creating Volumes" Execution completes without errors
  4. Now, I am not sure as to what is the volume I need to specify while invoking - "docker run -d -v ..." That is, which is the volume I am supposed to specify? Is it the volume that I specified originally in step 1 as the 3rd parameter ie, "/path/to/where/you/want/data/volume/"?

Some clarification would go a long way.

Thanks in advance.

CWSpear commented 5 years ago

It says in the docs that that volume needs to match up your mountpoints and has an example.

So if you do

docker run -d -v /data:/data ...

Then you need your mountpoint for a volume to start with /data:

docker volume create -d local-persist -o mountpoint=/data/images --name=images

devopsn commented 5 years ago

Thanks, I am able to get it working with Docker for Windows installation in Windows 10 Laptop. But follwoing the same steps not working in Docker Toolbox.