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 volumes to be bound from an image at runtime #55

Closed
jgangemi opened this issue Nov 26, 2014 · 4 comments
Closed

allow volumes to be bound from an image at runtime #55

jgangemi opened this issue Nov 26, 2014 · 4 comments
Milestone

Comments

@jgangemi
Copy link
Collaborator

i need to bind/export volumes as mount points when a container starts up. this would allow a workaround for containers that do not do this already do this (eg. the 'official' docker tomcat container).

i was going to suggest just adding a child element to volumes but perhaps that would be confusing, so maybe exports instead? eg:

<exports>
  <export>/path/in/container</export>
  <export>/path/in/host:/path/in/container</export>
</exports>

let me know thoughts, i have an immediate need for this and can spend some time on it in the coming days (followed by the naming issue as that's now 2nd on my list).

@rhuss
Copy link
Collaborator

rhuss commented Nov 27, 2014

If I understand you right, you want to have the possibility to export directories from the images when building an image.

This sounds a good idea. But is it possible to specify the host directory when building an image ? I think that's only an option when starting a container, in the image you can only specify the diretories/volumes to export.

For the naming, I probably would leave

<volumes>
   <export>/path/in/container</export>
</volumes>

We already have some 'double' config tags for <run> and <build>: <ports> and <env> so I guess its not more confusing than that ;-)

Also the external property configuration handler could benefit so that when you have a properties

docker.volumes.1=/container1
docker.volumes.2=/host:/container2

then /container1 and /container2 would be exposed during build, and /container2 would be mapped to /host while running a container. This fits to the model for port mapping where it is handled similarly.

@rhuss
Copy link
Collaborator

rhuss commented Nov 27, 2014

If you want to work on that, I can assign the issue to you.

@jgangemi
Copy link
Collaborator Author

sounds good - about 1/2 way done i think. need to add this to the property handler.

it doesn't appear that you can distinguish between child elements in a list, so i have to use a separate nesting element. right now i'm going with bind b/c that seems closer to docker terminology (looking at the help) but i can change it to whatever.

@rhuss
Copy link
Collaborator

rhuss commented Dec 16, 2014

Added this to integration and will be available in 0.10.6 (or maybe 0.11.0 because of the configuration syntax changes).

@rhuss rhuss closed this as completed Dec 16, 2014
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