-
Notifications
You must be signed in to change notification settings - Fork 528
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
Support for podman/buildah #66
Comments
We certainly need to provide support for both, same as we are doing with JIB. JKube must strive to be the single entry point for any cloud-native Java application, supporting any image builder available is a must to accomplish this. |
Podman 2.0, should work OOTB, but we can easily provide support for earlier versions (e.g. just by running the CLI and loading the generated image tarball) |
testcontainers/testcontainers-java#2088 fabric8io/docker-maven-plugin#1330 (comment) - 2.0 Problems with Content-Type header |
This feature should be implemented soon because the latest versions of OpenShift 4.X includes only podman and buildah instead of docker. Also Fedora 32 does not includes docker and podman is only included. To test the new environments I am updating a sample project developed some time ago from:
to:
but I found the following error:
Is there any plan to allow setup the builder strategy (podman, docker) in jkube plugins? |
Hi @rmarting I'm not sure about this, but with the latest OpenShift 4, S2I image build strategy should work OK without any config from your side by using (OpenShift-Maven-Plugin In case you want to use Docker (the default build strategy for Kubernetes-Maven-Plugin), these builds never run in the cluster (when using kubernetes-maven-plugin), so you'll always have to push those images to a shared/public registry ( You can also run Docker builds within an OpenShift cluster, but then again this is completely delegated to the cluster, so it should work regardless of docker implementation being Buildah or any other thing. In this case you should use The versions you mention in your issue are quite old. Could you please check with the current release ( Besides your current issue (that should get fixed with project as is), as stated in previous comments, support for Podman is definitely in our Roadmap. |
Hi @manusa Basically I am using the artifacts provided in Maven Central (only version 0.2.0) and not building jkube with the latest versions. I reviewed the documentation but I could not find how to setup I don't want to use Docker, I only want to verify that from my development local environment I can build an image using jkube and deploy into my OpenShift cluster, but it seems that if I don't have s2i works inside OpenShift, but this is not my case. I will try to build locally the latest version of jkube and test with the options that you describe. Thanks. |
Ok GAV Maven coordinates changed, that's why you don't find the new artifacts. They are published (no need to build):
As stated, if you are targeting an OpenShift cluster, you can/should openshift-maven-plugin, there will be no need to install anything in your laptop. If you want to try out |
I managed to make this work by making some minor changes to our
$ podman system service --time=100 tcp:127.0.0.1:2375
This is the only required change for the previous scenario to work: private HttpUriRequest addDefaultHeaders(HttpUriRequest req, Object body) {
req.addHeader(HttpHeaders.ACCEPT, "*/*");
if (body instanceof File) {
req.addHeader(HttpHeaders.CONTENT_TYPE, URLConnection.guessContentTypeFromName(((File)body).getName()));
} else if (body != null) {
req.addHeader(HttpHeaders.CONTENT_TYPE, "application/json");
}
return req;
} |
I'll provide an initial PR with the previous suggested fix, since this should be considered a BUG. Once corrected we can consider additional enhancements to automatically detect the Podman REST API socket ( |
The final agreement was to provide better documentation on how to use Podman >= 2.x with JKube. Podman is now already covering the gap and providing the necessary bindings so that it acts as a seamless and transparent Docker implementation. However, the files where Docker persists the auth credentials when running We should consider checking that file too when we are loading Docker auth credentials. See also: https://gitter.im/eclipse/jkube?at=60350c579337c51bc6a5fc2b |
Signed-off-by: Sun Tan <[email protected]>
Signed-off-by: Sun Tan <[email protected]>
Signed-off-by: Sun Tan <[email protected]>
Since Podman usage has been documented in #981, we can close this issue now. Further improvements to the Podman UX should be documented/requested in separate issues. |
We'd like to use this plugin in our Gitlab CI environment with podman. But the
Has anyone ever got this plugin to work with podman within Gitlab CI? |
@vilmosnagy : Umm, which container image are you using? Maybe that image doesn't support podman? I think this question is better suited for https://github.com/containers/podman/discussions |
@rohanKanojia any container image with podman installed 🙂 In my exact situation we use |
Add support for https://podman.io/ and https://buildah.io/
As more environment get installed by default with this container toolchain, Fedora 31 and Openshift 4 Clusters as an example, would be good to support those as well.
Blocked by:
#253
The text was updated successfully, but these errors were encountered: