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读取本地正在运行的docker容器
原文:https://www.cnblogs.com/lutt/p/12207623.html