-
Notifications
You must be signed in to change notification settings - Fork 54
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
refactor: avoid Dockerfile duplication #1430
refactor: avoid Dockerfile duplication #1430
Conversation
I have my doubts about the merits of this PR overall because I don't see the advantage of replacing several docker file with a Gradle task. What exactly are we optimizing? I would also dispute the notion that the Docker files are "duplicated", they simply are a build recipe for similar artefacts, not dissimilar to a More importantly though, this means, that docker images can only be built through Gradle then, which can be a problem. For example, this will break our Docker release process, because there we don't use the |
the gradle task is already there, I just centralized the Dockerfile (resulting a single file instead of 7 different ones).
Our build files are providing different runtime flavours (with different dependencies), but the Dockerfile "logic" is the same over the different files: put the fat jar into it, handle configuration and run the application.
There's no change in the build process: the |
db186b6
to
5dcbc86
Compare
5dcbc86
to
29d29f2
Compare
The docker release process (to dockerhub) does not use we'd have to also execute |
oh, yes, I got it wrong, anyway the I mean, in the I also noticed, in
I guess that happened because of the duplication, which is always bad and we should avoid it as much as possible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nit: if the docker file should remain at the repo root I would call it Dockerfile-template
or something, just to make it clear and avoid confusion
30a0e95
to
3a4f0c2
Compare
7b3e6b0
to
a3c3137
Compare
a3c3137
to
5ec6dde
Compare
0212561
to
d2a70ec
Compare
Quality Gate passedIssues Measures |
WHAT
Currently we have multiple Dockerfile around the codebase that are pretty much the same, to avoid duplication I put one in the root folder and have the
dockerize
task to copy it in the projectbuild
folder.That will make also the dependabot configuration slimmer
WHY
cleanup
FURTHER NOTES
deployment-test
was callingdockerize
for all the modules in the project, now it has been fixed to launch it only for required modulesCloses # <-- insert Issue number if one exists