jina.peapods.runtimes.container.helper module

jina.peapods.runtimes.container.helper.get_docker_network(client)[source]

Do a best-effort guess if the caller is already in a docker network

Check if hostname exists in list of docker containers. If a container is found, check its network id

Parameters

client – docker client object

Return type

Optional[str]

Returns

network id if exists