python读取本地正在运行的docker容器
import docker client = docker.from_env() docker_ps_list = client.containers() length = len(docker_ps_list) print(length) for container in docker_ps_list: print(container)
python 中文名:蟒蛇,设计者:Guido van Rossum
python 中文名:蟒蛇,设计者:Guido van Rossum
import docker client = docker.from_env() docker_ps_list = client.containers() length = len(docker_ps_list) print(length) for container in docker_ps_list: print(container)