[Bug]: testcontainers-java does not work when the container runtime needs no port exposing #7958
Labels
resolution/waiting-for-info
Waiting for more information of the issue author or another 3rd party.
type/bug
Module
Core
Testcontainers version
1.19.2
Using the latest Testcontainers version?
Yes
Host OS
Linux
Host Arch
x86
Docker version
What happened?
There are cases where no exposed or mapped ports are required. A common case being the network mode "host". For me it's happening when i run rootless Podman in a sidecar container using the Gitlab CI Kubernetes Executor, but here seems to be a ticket where Jenkins and Docker is used: #7903
In those cases, starting a container with exposed ports will fail, because the container runtime will not actually expose or map any ports. However, testcontainers-java requires the ports to be mapped. This happens without specifying a network mode, so it's not related to this issue: #5151
A workaround for this problem is to remove any exposed ports. However, this workaround has major disadvantages:
Relevant log output
Additional Information
No response
The text was updated successfully, but these errors were encountered: