MatchbookLab / local-persist

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

Hard-coded configuration file path #68

Closed robin-francois closed 3 years ago

robin-francois commented 5 years ago

Hi all,

It appears that the local-persist.json configuration file used by local-persist must be located at /var/lib/docker/plugin-data/local-persist.json according to the following code snippet: https://github.com/CWSpear/local-persist/blob/b28592c7a61d67aed934acb70f4b49498e497479/driver.go#L30

However, if the data-root parameter has been changed in the docker daemon.json, the local-persist.json file will be placed in <data-root>/plugin-data/, which will become an issue when local-persist tries to locate this configuration file in the future. The code should be adapted to retrieve the data-root from the docker configuration.

A temporary solution is to create a symbolic link so that local-persist can still find its configuration file: ln -s <data-root> /var/lib/docker/