Allow relative bind mount directories
tobad357 opened this issue · 2 comments
When doing testing it would be very useful to have docker-client changing relative bind mount paths to absolute paths as docker only allows absolute paths while people using docker-client may be running it from different project dirs
My suggestion would be that when using loadCompose and option could be to convert the relative volume paths to absolute ones based on the work dir
Example when workdir is /path/to/project/root
volumes:
- "./build/data:/data"
becomes
volumes:
- "/path/to/project/root/./build/data:/data"
Your example "/path/to/project/root/./build/data:/data"
would be a simple String concatenation. Do you think using Paths
to resolve the absolute directory would be even better?
I'm not sure if resolving would work as it could be deployed on a remote swarm node
So maybe just creating a proper path but not caring if it exists or not?