删除docker镜像和使用它的所有容器的快捷方式?

时间:2016-04-16 19:29:29

标签: docker

在开发过程中,我常常需要删除一个泊坞窗图像,但也要首先停止并删除所有使用它的容器。基本上我正在做的事情:

  • 停止图片的容器
  • 删除容器
  • 删除图片

这有什么捷径吗?

1 个答案:

答案 0 :(得分:3)

您可以为此

使用简单的bash脚本
munmap

请致电:

public ArrayList<HashMap<String, String>> getAllCotacts()
{
    ArrayList<HashMap<String, String>> array_list = new ArrayList<String>();
.
.
.
int counter = 0;
 while(res.isAfterLast() == false){
        HashMap<String, String> contact = new HashMap<String, String>();
        contactMap.put("index",res.getString(res.getColumnIndex(CONTACTS_COLUMN_ID));
        contactMap.put("name",res.getString(res.getColumnIndex(CONTACTS_COLUMN_NAME)));
        array_list.add(contact);
        res.moveToNext();
    }