master
yutent 2024-01-18 18:35:32 +08:00
parent 2b67ce3783
commit 34667c6f56
2 changed files with 5 additions and 3 deletions

View File

@ -86,8 +86,10 @@ class Docker:
def rm(self, id = ''): def rm(self, id = ''):
cmd = 'docker rm ' + id cmd = 'docker rm ' + id
out = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE) out = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE)
return out.stderr.decode().strip()
def rmi(self, id = ''): def rmi(self, id = ''):
cmd = 'docker rmi ' + id cmd = 'docker rmi ' + id
out = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE) out = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE)
return out.stderr.decode().strip()

View File

@ -176,7 +176,7 @@ class Images extends Component {
</section> </section>
<section class="field center"> <section class="field center">
<wc-popconfirm <wc-popconfirm
title="是否要删除此容器?" title="是否要删除此镜像?"
@confirm=${ev => this.#remove(it)} @confirm=${ev => this.#remove(it)}
> >
<span class="action">🗑</span> <span class="action">🗑</span>