-
Notifications
You must be signed in to change notification settings - Fork 644
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
Enhance direct Dockerfile support #205
Comments
Yet another idea: After the image has been build one could compress it into a single layer by:
Quite involved, but at the end we would have a nicely squeezed image which is especially useful if this image would be used as a based image. Whether this is worth to implement is discussable, though ;-) |
Do you know https://github.com/jwilder/docker-squash ? |
Yeah, but never tried it (and forgot about it again ;-). Thanks for the heads up. Might be an even more advance algorithm one could look at. However, with the plugin we are restricted for things which can be done via the Docker API (don't know whether docker-squash can do it) |
Hi Roland, I can see here in the envisaged features : I'd like to use variables defined in my pom.xml in my Dockerfile, For example I'd like to use the ${project.version} value during the build process based on my Dockerfile... About features, possibility to have multiple "dockerFile" instead of an unique dockerFileDir directive would be great too. Thank you |
@vberruchon: yes, exactly this feature is planned, but not yet implemented. You should be able to use Maven properties in a Dockerfile. This will be in one of the next releases, shouldn't be to hard of course. Maven property replacement works of course when you use the other, non-Dockerfile, mode. Maybe that's an option in the meantime ? btw, I'm open for pull requests, so if you like to push this you can send a PR, too ;-). I can help you here, too. /wrt multiple docke files: I also think that it is probably better to use a |
just as an aside, supporting this ties the not that i am against supporting this functionality, but i think we will need to put that in bold letters somewhere b/c i guarantee we'll start getting tickets of why things don't work. |
@jgangemi agreed, as soon as you use it as kind of a maven template it isn't usable standalone anymore. |
Ok thank you (I'd like to contribute but really not much time at the moment. I will keep it in mind but you'll probably have released the next version before) |
Don't worry, we will keep care of it :) |
With respect to resource filtering we must be careful with the expression interpolation facility introduced by Docker 1.9 which uses |
Also the pull authentication for the |
@vberruchon see #330 on how to do Maven variable interpolation inside |
Reiterating on the Dockerfile support in general, I have more and more the feeling that we should separate the two ways of building images more prominently (and not only by a low-level We could add extra configuration field Thoughts on this ? |
@rhuss break backwards compatibility, i'd rather the plugin have a sane configuration layout than force it to be backwards compatible, especially since your versioning still implies beta (0.X) |
…ed it more prominently. This is related to #205. Next steps is to add filtering and special keywords for adding additional configuration which can be confiured on this level.
As mentioned in #543 it make sense to also add the |
Actual property replacement just has landed with #777 and is available from 0.21.0 |
If you could add some logging output as follows, it'd probably save a few people some time. What threw me is that d-m-p creates a temporary directory but in
and it puts the Dockerfile in there, but it doesn't include the other files which are in The only way to be sure that they were included was to either run the image and see if it died, or attach to the image and look around, or open up the It would be cool if there was some logging at info level rather than just the following (I use
|
From the documentation it ignores The logging would be awesome indeed, I also spent a while just now with that issue. |
* Add `skipDockerPush` to skip image push when push goal is bound to deploy phase. * Add `skipDocker` to skip any Docker goal (useful when goals are bound to maven phases) * Test `BuildMojo` for skip actions. * Test `TagMojo` for skip actions. * Test `PushMojo` for skip actions. * Fix checkstyle errors * - Rebase on master - Expand imports
The following features should be added for a better experience when using Dockerfiles directly:
dockerFile
instead ofdockerFileDir
and the base directory is then set to the directory of this Dockerfile (ifdockerFileDir
is used, then the name of the dockerfile is supposed to beDockerfile
)ADD_ASSEMBLY
will add the proper ADD statements for the assmblyThe text was updated successfully, but these errors were encountered: