Skip to content

Commit

Permalink
doc: #66 adding doc how to use podman instead of docker
Browse files Browse the repository at this point in the history
Signed-off-by: Sun Tan <[email protected]>
  • Loading branch information
sunix authored and manusa committed Oct 11, 2021
1 parent 346ecff commit e62952d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions kubernetes-maven-plugin/doc/src/main/asciidoc/inc/_faq.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<jkube:build>> 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 <dockerHost> 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 <<image-name>>). It will depend upon what mode you're using in Eclipse JKube:
Expand Down

0 comments on commit e62952d

Please sign in to comment.