I have just started using testcontainers and I am getting into issues. Below is my code:
@ClassRule
public static GenericContainer redisContainer =
new GenericContainer("corporateurl/redis:latest")
.withExposedPorts(6379);
When I run this without the exposedPorts it works fine but with exposedPorts it gives an error:
Could not start container
java.lang.IllegalStateException: Container did not start correctly.
Any idea how to prevent that?