Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow relative bind mount directories #52

Open
tobad357 opened this issue Aug 28, 2017 · 2 comments
Open

Allow relative bind mount directories #52

tobad357 opened this issue Aug 28, 2017 · 2 comments
Assignees

Comments

@tobad357
Copy link
Contributor

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" 
@gesellix gesellix self-assigned this Aug 28, 2017
@gesellix
Copy link
Owner

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?

@tobad357
Copy link
Contributor Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants