private String getInternalIpAddress() {
        return getContainerInfo()
            .getNetworkSettings()
            .getNetworks()
            .values()
            .stream()
            .findFirst()
            .map(ContainerNetwork::getIpAddress)
            .orElseThrow(() -> new IllegalStateException("No network available to extract the internal IP from!"));
    }
Helper method to extract the internal IP address based on the network configuration.
modules/couchbase/src/main/java/org/testcontainers/couchbase/CouchbaseContainer.java