-
Notifications
You must be signed in to change notification settings - Fork 645
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 explicit volumes to override exportDir #62
Comments
I see your point. An export of the assembly doesn't make much sense if the assembly is intended to be used only internally. In fact since if we are able to export dedicated directories one could even argue to not export But while we are at it, my idea was also to support So some of the ideas are:
At the end there could be two use case: For building a simple data image or a simple microservice everything can be specified in the build configuration section directly in the pom.xml. For more complex needs (like your example with a specific volume export), a real Dockerfile can be provided (along with support files directly in the same directory and which can be added directly in the Dockerfile). The latter mode then should still support assemblies for sucking in dependencies and artifacts without providing ugly pathes into some target directory. Give me a day or two, I think we can come up with a good and powerful solution for covering most (if not all) use cases when building images. |
i like not having to use a Dockerfile for what i'm doing. in most cases, the i have somewhat of an odd use case here b/c i'm using the maven-frontend-plugin to run a angular/grunt build and then i'm using the docker plugin to build/deploy the container it will live in. the assembly descriptor works just fine for me b/c in addition to creating the container, i can use it to produce a binary file via the assembly plugin directly. either way, having the ability to export a volume as part of building the image and adding a check to see if the i'm all for supporting the Dockerfile if you want to build a complex container via this process but if someone is happy w/ the current mechanism (like me), i don't think they should be forced to use a more complex process if they don't have to. of course, someone may argue that the assembly descriptor is more complex, so... |
Completely agreed. So the final question is how to determine whether exportDir should be
|
I'll add the implicit behaviour to not export an |
i agree w/ those options. i can tackle this as part of finishing off the container options given i have an immediate need for it unless you want to handle it. |
Ok, go ahead. BTW, in other issue #53 Thomas has problems with the UID of the exported directory. I tried to changed from ADD to COPY but this didn't helped. My idea is to use an extra configuration (like 'assemblyUser') and then do the required 'chown' on our own by inserting it into the on-the-fly generated Dockerfile. Since this is yet another assembly related paremeter, what do you think about combining this into extra configuration section like in
For backwards compatibility one would still support I think this is much cleaner leading to a better structured configuration, what do you think ? |
i would change |
The stuff with support for Dockerfiles can be found here #13 |
Yes, I think before introducing I will take care about #64 (and include your volume export there) |
i don't think that's a good idea actually - what if i just want to expose a volume w/o actually putting anything in it? i shouldn't need the assembly section to do that and in fact, i was going to try and make that be completely optional if you are ok w/ the defaults used (i'm mid-typing this out in the other ticket). |
Hmmm, why would you like to do this ? I mean, exposing something without putting in anything ? An example would be helpful to get me on track .... |
(BTW, have to leave soon, but I will setup an IRC channel on freenode tomorrow, so we don't have to chat via issues ;-) |
I can see wanting to do a VOLUME for /var/logs/application_name as a volume since the contained application would perhaps do all logging to this location. I would then mount this exposed volume to my host somewhere such that I could search all running container logs in a single location on the host. Or I have to have the logs for audit purposes going back in time XX amount regardless whether the container still exists or not. |
yeah, what @chris-snider said is what i was about to type out. i think the assembly should focus solely on what ends up in the container from the project and not control anything related to how the container is constructed, etc except for offering the convenience of automatically exposing whatever destination directory this ended up in. and a irc channel sounds good. |
Ok, see your point now. Let's keep outside the assembly and the section deals only about the data from the assembly descriptor (including the ownership and whether the assembly root dir should be added to the list of exposed volumes or not). |
sounds good - i'll have a preview of things to come documented for feedback in #64 very shortly. |
released in 0.11.0 |
…ve-image fabric8io#47 - removeImage Mojo added
i'm trying to build a data volume for an nginx and based on the directions, i need to place content in the following two places
to do this i set my
/
and manage the output directories in theassembly.xml
file. the problem is/
is turned into a volume which makes the container unusable.i'd like to propose the addition of a
volumes
element that takes an explicit list of volumes to expose and if this is tag has values, it overrides exposingexportDir
as a volume.thoughts?
The text was updated successfully, but these errors were encountered: