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

Convert host machine path to virtual machine path for those who use boot2docker #188

Closed
wants to merge 1 commit into from
Closed

Convert host machine path to virtual machine path for those who use boot2docker #188

wants to merge 1 commit into from

Conversation

sergey-davydov
Copy link

Hacky workaround like this: https://github.com/boot2docker/boot2docker/blob/1bf1671c0f5c103ac4e2229b96a21a04b6d99043/rootfs/rootfs/etc/rc.d/automount-shares#L34
Pros: now you can use the variable ${project.build.directory} in run.volumes.bind.volume

@rhuss
Copy link
Collaborator

rhuss commented Jun 14, 2015

Thanks for your PR.

Please help me a bit to understand this PR: ${project.build.directory} contains backslashes on Windows, so this mangling is needed on windows only, right ?

What exactly is your use case ? To mount a directory within you source in the container when running it (and using boot2docker) ?

Could you give me an example how a build directory on Windows really looks like (sorry, don't have one available) ? I know that boot2docker can map directories within a user home directory to the the VM, but I think ${project.build.directory} should have a defined format. Your regexps looks a bit like a shot gun approach.

To nail this down to a single expression would be cool (should be really possible). It really would help if you can provide some examples what kind of paths should be mapped to what.

Thanks !

@sergey-davydov
Copy link
Author

  1. yes
  2. yes
  3. ${project.build.directory} on Windows looks like this one: "C:\Users\0x7364\Projects\test\target" and mount point looks like this one: "/c/Users/0x7364/Projects/test/target". I was trying to write a regular expression like boot2docker automount-shares in order to get a clear understanding of why this is necessary. Of course it can be simplified.

@rhuss
Copy link
Collaborator

rhuss commented Jul 3, 2015

I added the patch (manually) for release 0.12.1 (due this friday)

Thanks !

@rhuss rhuss closed this Jul 3, 2015
rhuss added a commit that referenced this pull request Jul 3, 2015
rhuss added a commit that referenced this pull request Jul 3, 2015
leusonmario pushed a commit to leusonmario/docker-maven-plugin that referenced this pull request Aug 18, 2018
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

Successfully merging this pull request may close these issues.

2 participants