Quarkus + dev services/testcontainers + podman

670 views
Skip to first unread message

Michal Jurč

unread,
Sep 2, 2021, 4:14:12 AM9/2/21
to quark...@googlegroups.com
Hello all,

I've been playing a bit with Quarkus and test containers/dev services on
Fedora
34. I have been able to make things work with podman from dnf and the
following
setup:

sudo dnf install podman
systemctl --user start podman.socket
export DOCKER_HOST=unix:///run/user/${UID}/podman/podman.sock

There is an issue with test-containers/podman currently which makes the
setup
a little flaky if the user doesn't have the container they want to use
present
in their local repository[0].

Other than that, the set up works as far as I can see. Is this something
we may
want to document how to run with Quarkus in Quarkus docs? Especially
considering the upcoming licencing changes for docker.

Thanks and best regards,
--MJ

[0] https://github.com/testcontainers/testcontainers-java/issues/4440

Rostislav Svoboda

unread,
Sep 2, 2021, 8:03:37 AM9/2/21
to Michal Jurc, quark...@googlegroups.com


> On 2. 9. 2021, at 10:14, Michal Jurč <mj...@redhat.com> wrote:
>
> Hello all,
>
> I've been playing a bit with Quarkus and test containers/dev services on Fedora
> 34. I have been able to make things work with podman from dnf and the following
> setup:
>
> sudo dnf install podman
> systemctl --user start podman.socket
> export DOCKER_HOST=unix:///run/user/${UID}/podman/podman.sock
>

Does this setup also work with docker-maven-plugin ?

> There is an issue with test-containers/podman currently which makes the setup
> a little flaky if the user doesn't have the container they want to use present
> in their local repository[0].
>
> Other than that, the set up works as far as I can see. Is this something we may
> want to document how to run with Quarkus in Quarkus docs? Especially
> considering the upcoming licencing changes for docker.
>
> Thanks and best regards,
> --MJ
>
> [0] https://github.com/testcontainers/testcontainers-java/issues/4440
>
> --
> 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/4c04112e-8f14-8517-c880-17cd4431eed4%40redhat.com.
>

Michal Jurč

unread,
Sep 6, 2021, 3:31:03 AM9/6/21
to Rostislav Svoboda, quark...@googlegroups.com

On 9/2/21 2:03 PM, Rostislav Svoboda wrote:
>
>> On 2. 9. 2021, at 10:14, Michal Jurč <mj...@redhat.com> wrote:
>>
>> Hello all,
>>
>> I've been playing a bit with Quarkus and test containers/dev services on Fedora
>> 34. I have been able to make things work with podman from dnf and the following
>> setup:
>>
>> sudo dnf install podman
>> systemctl --user start podman.socket
>> export DOCKER_HOST=unix:///run/user/${UID}/podman/podman.sock
>>
> Does this setup also work with docker-maven-plugin ?
Yes, the setup works with the plugin. Some containers have issues with
startup on default, like DB2, but so far, I have not been able to
investigate further.

Alexey Loubyansky

unread,
Sep 6, 2021, 3:37:26 AM9/6/21
to Michal Jurc, Quarkus Development mailing list
Thanks Michal! We definitely need to document this. Will you take care of it?

Michal Jurč

unread,
Sep 8, 2021, 8:29:27 AM9/8/21
to Alexey Loubyansky, Quarkus Development mailing list

Hello,

sure, I'll update the affected docs.

--MJ

Michal Jurč

unread,
Sep 19, 2021, 5:53:07 PM9/19/21
to Quarkus Development mailing list

Hi all,

I've been looking for a place where to include the possible podman configuration, but I haven't found any fitting spot. The native build things already work on docker and testcontainer/dev services stuff is spread across the respective areas.

Have I missed anything? Does anybody have a better idea what could be a good place to include it?

--MJ

Stuart Douglas

unread,
Sep 19, 2021, 6:13:28 PM9/19/21
to Michal Jurc, Quarkus Development mailing list
It will need a new config object (quarkus.container ?). As much as possible this should be unified IMHO, so we have all this related config in one place, and deprecate older config items.

Stuart

Max Rydahl Andersen

unread,
Sep 19, 2021, 6:25:17 PM9/19/21
to Michal Jurč, Quarkus Development mailing list

what is the podman specific configuration you think we need ?

/max

Michal Jurč

unread,
Sep 20, 2021, 3:51:54 AM9/20/21
to Max Rydahl Andersen, Quarkus Development mailing list

It is not specific for us - it is just to enable running test containers/dev services with podman. It is these three shell commands in F34:

sudo dnf install podman
systemctl --user start podman.socket
export DOCKER_HOST=unix:///run/user/${UID}/podman/podman.sock

Max Rydahl Andersen

unread,
Sep 20, 2021, 6:12:32 AM9/20/21
to Michal Jurč, Quarkus Development mailing list

On 20 Sep 2021, at 9:51, Michal Jurč wrote:

It is not specific for us - it is just to enable running test containers/dev services with podman. It is these three shell commands in F34:

sudo dnf install podman
systemctl --user start podman.socket

we don't install nor run docker for user ...also only a small fraction would be running on fedora so not sure these make sense to run for user .

export DOCKER_HOST=unix:///run/user/${UID}/podman/podman.sock

this is relevant but different per OS and in future versions of podman this will be default setup....so not sure we would put this...shouldn't we be
setting a testcontainer option directly rather than overwrite docker host ?

/max

--
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

Jason Greene

unread,
Sep 20, 2021, 8:01:28 AM9/20/21
to mand...@redhat.com, Michal Jurč, Quarkus Development mailing list
One of the long term goals I have hoped for is some form of auto install for Quarkus that fetches everything you need, starting from a cut and paste on the Quarkus website (e.g a jbang script - since it already does jdk install)

I think downloading and installing podman belongs there. When it gets to Quarkus bootstrap, we should detect podman and use it appropriately (at some point preferring it to docker). I agree with Max that testcontainer API is probably the best config point (and we can contribute patches to their community there to improve if necessary). We might want to display instructions if we can’t find one or the other container runtimes.

On Sep 20, 2021, at 5:12 AM, Max Rydahl Andersen <mand...@redhat.com> wrote:



Michal Jurč

unread,
Oct 27, 2021, 3:16:07 PM10/27/21
to Quarkus Development mailing list

Hi all,

I've found a bit of time and finally made a little write-up about config for Podman with dev services/testcontainers on Linux.

I wasn't sure where in docs to put it, so a blog post seemed like a way to go.

PR: https://github.com/quarkusio/quarkusio.github.io/pull/1189

--MJ

George Gastaldi

unread,
Oct 27, 2021, 3:31:45 PM10/27/21
to Michal Jurc, Quarkus Development mailing list
That's really awesome, good job!

Can you create a guide too?

Reply all
Reply to author
Forward
0 new messages