fix(avatar): 杜绝发布后继续运行旧镜像 #24
@@ -74,7 +74,9 @@ def main():
|
|||||||
|
|
||||||
def inspect_container(name, errors):
|
def inspect_container(name, errors):
|
||||||
try:
|
try:
|
||||||
output = subprocess.check_output(["docker", "inspect", name], text=True)
|
output = subprocess.check_output(
|
||||||
|
["docker", "inspect", name], universal_newlines=True
|
||||||
|
)
|
||||||
return json.loads(output)[0]
|
return json.loads(output)[0]
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
errors.append(f"cannot inspect container {name!r}: {exc}")
|
errors.append(f"cannot inspect container {name!r}: {exc}")
|
||||||
|
|||||||
Reference in New Issue
Block a user