Binding in wrong interface.
wirtsleg opened this issue · 1 comments
wirtsleg commented
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
dasniko commented
Thanks for reporting.
If you already know the solution, can I ask you to do a PR for this, please!?
Thanks, Niko
… Am 22.10.2020 um 17:19 schrieb Aleksandr Kozhenkov ***@***.***>:
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 <https://github.com/wirtsleg/testcontainers-network-bug>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#9>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAP2YZETLQXIQ4JKGTDE4N3SMBERHANCNFSM4S3LEDUQ>.