private Set<String> findAllNetworksForLinkedContainers(LinkableContainer linkableContainer) {
        return dockerClient
            .listContainersCmd()
            .exec()
            .stream()
            .filter(container -> container.getNames()[0].endsWith(linkableContainer.getContainerName()))
            .filter(container -> {
                return container.getNetworkSettings() != null && container.getNetworkSettings().getNetworks() != null;
            })
            .flatMap(container -> container.getNetworkSettings().getNetworks().keySet().stream())
            .distinct()
            .collect(Collectors.toSet());
    }
@return the ports on which to check if the container is ready
@deprecated use {@link #getLivenessCheckPortNumbers()} instead
core/src/main/java/org/testcontainers/containers/GenericContainer.java