MatchbookLab / local-persist

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

WSL Plugin not found / registered #79

Open DaveTorrey opened 4 years ago

DaveTorrey commented 4 years ago

I'm using wsl -- I started a container for the plugin --

local-persist.sock is sitting in /run/docker/plugins

I added the volumes that I want to use:

/data

I try to run the command:

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

but only receive the error:

Error response from daemon: create images: error looking up volume plugin local-persist: plugin "local-persist" not found

now clearly it's in there. I thought maybe i just needed to restart. Not only did I try restarting docker, but the entire computer but every time i run docker plugin ls, it does not show in there.

Am I missing a step to get this thing registered properly?

CWSpear commented 4 years ago

It's not a matter of just having the sock in plugins, you have to have the container running and it has to have access to the sock:

docker run -d \
    --name local-persist \
    -v /run/docker/plugins/:/run/docker/plugins/ \
    -v /data/:/data/ \
    -v /CHANGE_THIS_PATH/:/var/lib/docker/plugin-data/ \
        cwspear/docker-local-persist-volume-plugin

In that case, since you named it local-persist, you can check logs to make sure it's running ok:

docker logs local-persist

You can add a -f after logs to have it follow the logs so you can see what the output is while you try to create a volume.

I haven't tested this in WSL, so your mileage may vary.