def stop_container(id):
cli = docker.Client(base_url=base_url)
try:
cli.stop(container=id)
alert = "SUCCESS: stopped container " + id
except:
alert = "ERROR stopping container " + id
redirect("/docker?alert="+alert)
文章目录