Skip to content
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

doc: #66 adding doc how to use podman instead of docker #981

Merged
merged 1 commit into from
Oct 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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