Open Flying--Dutchman opened 4 years ago
docker-compose
expands directories to the full path by default... I'll have to look closer, but it is probably the case that compose doesn't know that mountpoint
is a directory, so it doesn't expand it (i.e., it's just trying to pass in to the plugin directly).
I don't think I can get the path that the docker-compose.yml
is in to be able to expand it correctly myself... so at first blush, I don't think it's possible, but is probably worth digging into a bit more.
In the meantime, some systems will pass through the PWD
environment variables to compose, so you can try this: mountpoint: ${PWD}/mariadb
Thats too bad, hope it will be possible in the future. Thank you very much for your help.
In the meantime, some systems will pass through the PWD environment variables to compose, so you can try this: mountpoint: ${PWD}/mariadb
~~Unfortunately, this is throwing the same error. Will stick to fixed paths then.~~
${PWD} is working, thank you 👍
Closing issue...
Problem was apparently not the dot, but an orphaned container. As it seems, relative paths are working as expacted.
Only thing ist, missing directories are not automaticly created.
It does attempt to create the directory, but there are things that can happen such that it won't work: https://github.com/MatchbookLab/local-persist/blob/a8e9cdd7e345b28d09dee47f3bc77d0e0ffb13eb/driver.go#L110-L116
You could try looking at the driver's logs (i.e. journelctl for systemd or whatever it is...) to see what the error there says.
Thank you.
I noticed in Portainer, the following:
So, apparently relative paths, starting with a dot are not working. When using ${PWD}, the volume creates just fine.
For the time beeing, maybe add it to the readme?
Is it possible to use relative paths in the docker-compose.yaml file? So, something like:
When I execute
docker-compose up .
, I'm getting following error:EDIT: local-persist was installed using the "Quick way", with the install script in README.