From 5ae641862754e4bf05b1d6b140637bb2ce0d8f60 Mon Sep 17 00:00:00 2001 From: Sun Tan Date: Fri, 8 Oct 2021 08:58:19 +0000 Subject: [PATCH] doc: #66 adding doc how to use podman instead of docker Signed-off-by: Sun Tan --- .../doc/src/main/asciidoc/inc/_faq.adoc | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/kubernetes-maven-plugin/doc/src/main/asciidoc/inc/_faq.adoc b/kubernetes-maven-plugin/doc/src/main/asciidoc/inc/_faq.adoc index f95e5fc6c0..db8fb74039 100644 --- a/kubernetes-maven-plugin/doc/src/main/asciidoc/inc/_faq.adoc +++ b/kubernetes-maven-plugin/doc/src/main/asciidoc/inc/_faq.adoc @@ -142,6 +142,27 @@ You can also provide a host for it in XML config like this: You can find an example in our link:https://github.com/eclipse/jkube/tree/master/quickstarts/maven/spring-boot[spring-boot] quickstart in `kubernetes-with-ingress` profile. +=== How do I build the image with Podman instead of Docker? + +When invoking <> with only Podman installed, the following error appears: + +---- +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD FAILURE +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 2.045 s +[INFO] Finished at: 2021-10-07T11:02:15+02:00 +[INFO] ------------------------------------------------------------------------ +[ERROR] Failed to execute goal org.eclipse.jkube:kubernetes-maven-plugin:1.4.0:build (default-cli) on project live-stream-question: Execution default-cli of goal org.eclipse.jkube:kubernetes-maven-plugin:1.4.0:build failed: No given, no DOCKER_HOST environment variable, no read/writable '/var/run/docker.sock' or '//./pipe/docker_engine' and no external provider like Docker machine configured -> [Help 1] +---- + +By default, JKube is relying on the Docker REST API `/var/run/docker.sock` to build Docker images. Using Podman even with the Docker CLI emulation won't work as it is just a CLI wrapper and does not provide any Docker REST API. +However, it is possible to start an emulated Docker REST API with the podman command: +---- +export DOCKER_HOST="unix:/run/user/$(id -u)/podman/podman.sock" +podman system service --time=0 unix:/run/user/$(id -u)/podman/podman.sock & +---- + === How to configure image name generated by Eclipse JKube? If you want to configure image name generated by Eclipse JKube which is `%g/%a:%l` by default(see <>). It will depend upon what mode you're using in Eclipse JKube: