I'm trying to use testcontainers (v1.4.2) for integration testing between a Spring Boot service packed into a GenericContainer and a MysqlContainer.
Unfortunately, getContainerIpAddress will always return "localhost".
Hence, ((MySQLContainer) mysql).getJdbcUrl() will just return garbage: jdbc:mysql://localhost:32821/test
My system: Archlinux x64, Docker version 17.07.0-ce
But same error on colleague's Mac.
The following part of GenericContainer.java doesn't make sense to me
@Override
public String getContainerIpAddress() {
return DockerClientFactory.instance().dockerHostIpAddress();
}
-> isn't that just returning the mere ip address of the host running docker service?
What I expected here to see is a call returning the IP address of the virtual network interface related to the desired container.... please correct me if I'm wrong...
I'm trying to use testcontainers (v1.4.2) for integration testing between a Spring Boot service packed into a GenericContainer and a MysqlContainer.
Unfortunately, getContainerIpAddress will always return "localhost".
Hence, ((MySQLContainer) mysql).getJdbcUrl() will just return garbage:
jdbc:mysql://localhost:32821/testMy system: Archlinux x64, Docker version 17.07.0-ce
But same error on colleague's Mac.
The following part of GenericContainer.java doesn't make sense to me
-> isn't that just returning the mere ip address of the host running docker service?
What I expected here to see is a call returning the IP address of the virtual network interface related to the desired container.... please correct me if I'm wrong...