GenericContainer does not start up with podman in host networking mode
#11225
Replies: 1 comment
-
|
This isn't really a Testcontainers bug — it's how host networking works. In The fix is to let the container use the default/bridge network so ports get published. Rootless Podman normally uses Remove/override that so containers fall back to the default rootless network, and |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am running an IntegrationTest using TestContainers version 1.21.3 on a rootless podman setup.
On Startup a GenericContainer is running an assertion that asserts that the ports exposed post container startup match the container definition. This assertions depends on running a
container inspectcommand which in case of podman ispodman inspect.The problem is that when I start a rootless podman , podman chooses the host networking on its own and in that mode when you run
podman inspectthe NetworkSettings are empty. This always fails the assertion being made the "testcontainers" library (GenericContainer : Line 457).Is this a bug ? How do I get around this issue ?
Podman Inspect output looks like this :
Podman version : 5.4.0
Beta Was this translation helpful? Give feedback.
All reactions