Creating container images without Docker, using JIB

1,759 views
Skip to first unread message

Jonathan Vila

unread,
Feb 12, 2021, 3:30:44 AM2/12/21
to Quarkus Development mailing list
Hi

Is there any way to create container images without having Docker installed, having only Podman ? 
We are trying to do everything with podman, but , apparently JIB needs Docker installed to put its images in the docker images repository, and also to push images to the external registries we need to do docker login ....

Thank you

Jonathan Vila
-- 
Barcelona Java Users Group Leader


Georgios Andrianakis

unread,
Feb 12, 2021, 3:36:37 AM2/12/21
to Jonathan Vila, Quarkus Development mailing list
On Fri, Feb 12, 2021 at 10:30 AM Jonathan Vila <jona...@barcelonajug.org> wrote:
Hi

Is there any way to create container images without having Docker installed, having only Podman ? 
We are trying to do everything with podman, but , apparently JIB needs Docker installed to put its images in the docker images repository, and also to push images to the external registries we need to do docker login ....

Jib only needs docker if you build the container locally. If you are instead pushing the image to a registry (-Dquarkus.container-image.push=true), then you do not have to have docker installed.
Furthermore, you don't need to do a docker login, you can use https://quarkus.io/guides/all-config#quarkus-container-image_quarkus.container-image.username

Thank you

Jonathan Vila
-- 
Barcelona Java Users Group Leader


--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CABNTrS_U7POF%2B-uqO8JZktRYdPGFeYE9zR%3Dp4cDtYKfns37yXw%40mail.gmail.com.

Jonathan Vila

unread,
Feb 12, 2021, 3:42:01 AM2/12/21
to Georgios Andrianakis, Quarkus Development mailing list
Great.

Thank you Georgios.

Jonathan Vila
-- 
Barcelona Java Users Group Leader



Georgios Andrianakis

unread,
Feb 12, 2021, 3:42:50 AM2/12/21
to Jonathan Vila, Quarkus Development mailing list
Sure thing!

Jonathan Vila

unread,
Feb 12, 2021, 4:58:51 AM2/12/21
to Georgios Andrianakis, Quarkus Development mailing list
So in summary :

* to push directly to quay without needing docker login :
         -Dquarkus.container-image.push=true \
         -Dquarkus.container-image.username=XXXX -Dquarkus.container-image.password=YYYY

* if you build instead of pushing then JIB will always put the image in the docker local storage

* I need to investigate which is then the purpose of : -Dquarkus.docker.executable-name=podman



Jonathan Vila
-- 
Barcelona Java Users Group Leader




El vie, 12 feb 2021 a las 10:53, Jonathan Vila (<jona...@barcelonajug.org>) escribió:
yep, confirmed, with quarkus.container-image.username and password it worked

Jonathan Vila
-- 
Barcelona Java Users Group Leader




El vie, 12 feb 2021 a las 10:50, Jonathan Vila (<jona...@barcelonajug.org>) escribió:
I can do that, but in advance I say that one thing is the application to be used ( JIB doesnt use it ) and another thing is where to put the images

by the way the properties you mentioned for jib to connect to the registry dont work for me..... and looking at the jib guide there are other properties to use : 

The username to use to authenticate with the registry where the built image will be pushed

string

The password to use to authenticate with the registry where the built image will be pushed


I will try with these ..... for the moment this is my command :

./mvnw clean package -Pnative -DskipTests \
            -Dquarkus.native.container-build=true \
            -Dquarkus.native.container-runtime=podman \
            -Dquarkus.container-image.push=true \
            -Dquarkus.container-image.tag=0.0.2 \
            -Dquarkus.container-image.group=jonathanvila \
            -Dquarkus.jib.base-registry-username=jonathanvila -Dquarkus.jib.base-registry-password=XXX -Dquarkus.docker.executable-name=podman


Jonathan Vila
-- 
Barcelona Java Users Group Leader




El vie, 12 feb 2021 a las 10:23, Georgios Andrianakis (<gand...@redhat.com>) escribió:
I admit I don't know anything about podman, but I was under the impressions that

alias docker=podman

is supposed to be the solution :)

On Fri, Feb 12, 2021 at 11:16 AM Jonathan Vila <jona...@barcelonajug.org> wrote:
apparently not
I've tried now and the image is located under docker images, not podman

even in the guide says that : https://quarkus.io/guides/container-image
. This means that although Docker isn’t used to build the image, it is nevertheless necessary. Also note that using this mode, the built container image will show up when executing docker images.

Jonathan Vila
-- 
Barcelona Java Users Group Leader




El vie, 12 feb 2021 a las 9:48, Georgios Andrianakis (<gand...@redhat.com>) escribió:
It should work today if you use the quarkus-container-image-docker extension by setting -Dquarkus.docker.executable-name=podman.

On Fri, Feb 12, 2021 at 10:45 AM Jonathan Vila <jona...@barcelonajug.org> wrote:
one last thing....... is there in the roadmap to allow use the podman local registry to put the images ?

Georgios Andrianakis

unread,
Feb 12, 2021, 5:10:04 AM2/12/21
to Jonathan Vila, Quarkus Development mailing list
On Fri, Feb 12, 2021 at 11:58 AM Jonathan Vila <jona...@barcelonajug.org> wrote:
So in summary :

* to push directly to quay without needing docker login :
         -Dquarkus.container-image.push=true \
         -Dquarkus.container-image.username=XXXX -Dquarkus.container-image.password=YYYY

* if you build instead of pushing then JIB will always put the image in the docker local storage

Yes, that is expected

* I need to investigate which is then the purpose of : -Dquarkus.docker.executable-name=podman

The is used with the docker extension, not the jib extension.
The purpose is to run all generated commands with the podman executable instead of the docker executable

Sébastien Dionne

unread,
Feb 12, 2021, 6:56:46 AM2/12/21
to Quarkus Development mailing list
There is Kaniko also to build dockerfile into container.  It works without docker installed.

there is a extension for that ?   


Georgios Andrianakis

unread,
Feb 12, 2021, 7:25:41 AM2/12/21
to Sébastien Dionne, Quarkus Development mailing list
Nope, but that would be a nice addition :)

On Fri, Feb 12, 2021 at 1:56 PM Sébastien Dionne <sebastie...@gmail.com> wrote:
There is Kaniko also to build dockerfile into container.  It works without docker installed.

there is a extension for that ?   


--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.

Sébastien Dionne

unread,
Feb 12, 2021, 7:53:33 AM2/12/21
to Quarkus Development mailing list
:)

OK, I'll look into it later.  I plan to try to add it in a Jenkins pipeline.. after that, I'll look to add it at command line for Quarkus applications

Reply all
Reply to author
Forward
0 new messages