How do I list all containers in a user-defined docker network?

后端 未结 6 1738
刺人心
刺人心 2021-02-04 08:12

How do I get a list of all the containers in a user-defined docker network?

I would like to get all the commit hashes of every container for a specific user-defined dock

6条回答
  •  甜味超标
    2021-02-04 08:31

    Solution can be simple as below as well. To list name of the container only

    docker network inspect NETWORK ID | grep "Name" | awk -F":" '{print $2}' | tr -d ',"'

提交回复
热议问题