-
Notifications
You must be signed in to change notification settings - Fork 1
Create Docker image without daemon by using Jib #2
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
base: main
Are you sure you want to change the base?
Conversation
|
Thanks for the PR! I will respond with more details next week. From a quick skim, I can already say that we would like to keep the Gradle files as Groovy. The benefit of Kotlin is small (it's still a custom DSL, not "straight-forward" Kotlin syntax). We'd rather keep all our projects in Groovy, to make it easier to copy things between projects. Maybe in the future we'll migrate all projects to Kotlin. |
| bouncyCastleVersion=1.82 | ||
| flywayVersion=11.14.0 | ||
| springBootVersion=3.5.7 |
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.
If we make these reusable, we should use Version Catalogs: https://docs.gradle.org/current/userguide/version_catalogs.html
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.
Right, I wasn't aware such thing exist. My concern is that will automated patching tools like Renovate and Dependabot be able to interpret and modify that? I would do this change in a separate pull request.
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.
I don't know. But since Version Catalogs are a first-class Gradle feature, I would expect these tools to implement support for that (if they haven't already).
👍
I see. My point of view is that Kotlin is more general purpose language, while Groovy is just used in Gradle build scripts. I strongly prefer to use the more general purpose language and try to avoid use case specific languages where I can. I used ChatGPT for the initial porting work. For bootstrapping new Spring Boot projects the Spring Initializr is really helpful as it can generate the project with reasonably good output and avoids needing to copy the build files around: https://start.spring.io/ |
d95bbfc to
9460d5d
Compare
|
Rebased on 1658768 |
Amended-by: Thore Göbel <thore.goebel@securosys.ch> Proposed in #2.
|
Regarding Jib: I'm also not yet sure if we want to use this. Specifically, if Jib is the level of abstraction that we want. It is another magic tool that developers need to learn and understand. For context: The As mentioned in https://docs.securosys.com/fireblocks/download, we don't have prebuilt Docker images for the Fireblocks Custom Server yet. I am using this opportunity to survey all the Securosys-internal Spring Boot projects and will look into how to unify/modernise/streamline the image build process. From what it looks right now, we won't be taking the changes in this PR 1:1. We'll most likely pick a few things (like adding OCI labels) and leave others (like the Groovy->Kotlin). I already picked your change to remove the exec bits: 87dd36a |
Jib is very widely adopted with 14k stars: https://github.com/GoogleContainerTools/jib
Understood. I require a Docker image to test the full deployment.
Understood.
Alright, you are welcome to use anything you need and leave anything you don't. |
Change the build to use jib Gradle plugin, which can build container images without needing the Docker daemon and able to build cross platform images. See:
https://github.com/GoogleContainerTools/jib/tree/master/jib-gradle-plugin
Fixes #1