-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Add support for publishing docker images to a registry #21001
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
Comments
This comment has been minimized.
This comment has been minimized.
I don't think this use case should be something the spring-boot maven plugin should do. If it did, shouldn't it also need to include goals to deploy the application/image into different platforms? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I think then thy my comment is not outdated. #21001 (comment) |
@jorgemoralespou Can you elaborate a bit more on the problems we might face? I was originally thinking we might be able to shell out and call |
Well, there's 2 sides:
|
If there was a single purpose Maven and Gradle plugin that we could lean on and perhaps automatically configure (so you don't need to give the image tag) that would be an ideal option. The only one I found when looking previously was jib, and pushing isn't really a stand-alone feature. I also didn't have much luck finding a Java library that can talk to the registry, only Go and Python seem to exist. Perhaps RegistryClient from jib will be extracted into a library at some point. |
Images can be tagged and pushed using the Docker daemon API, letting the daemon do all the work. We're in the process of adding support for authenticating to a registry from the daemon, which should suffice for pushing also. We've generally tried to maintain parity between the Boot plugins and the |
A docker registry running in testcontainers behaves differently in CI vs running locally. Disabling the tests for now while working on getting them running reliably in CI. See spring-projectsgh-21001
the way the maven lifecycle is structured, it seems to me that publishing should be separate from building. the |
@theHilikus There is some discussion of this in #26187. We've tried to keep the focus of the Spring Boot build plugins on Cloud Native Buildpacks integration, and avoid adding features to cover the full lifecycle of an OCI image. |
I missed that ticket. thank you |
Uh oh!
There was an error while loading. Please reload this page.
Currently we don't have the option to publish a locally built docker image to a remote repository. You can do it using the docker CLI, but it would be nice to have some built in support.
The text was updated successfully, but these errors were encountered: