dasniko/testcontainers-keycloak

Binding in wrong interface.

wirtsleg opened this issue · 1 comments

There is a bug with user-defined network. If this network name alphabetically is after default "bridge", then container is available only in this network. But if network name alphabetically is before "bridge", then container is available in this network and from host too.
In testcontainers network name is UUID, so these tests are flaky.

Sergei Egorov from testcontainers noticed that a container binds on wrong interface and starting container with a command

.withCommand(
                "-c standalone.xml",
                "-b 0.0.0.0",
                "-Dkeycloak.profile.feature.upload_scripts=enabled"
            )

solves the problem.

Example can be found here (it uses GenericContainer, but can be easily applied to KeycloakContainer):
https://github.com/wirtsleg/testcontainers-network-bug