Commit 4b1a19e9 authored by 金凯强's avatar 金凯强 🎨

镜像打包前,删除旧镜像

parent fc041863
...@@ -77,6 +77,9 @@ class ImageClass(): ...@@ -77,6 +77,9 @@ class ImageClass():
if not os.path.exists('/data/upgrade'): if not os.path.exists('/data/upgrade'):
os.mkdir('/data/upgrade') os.mkdir('/data/upgrade')
# 删除旧镜像
os.system('rm -f /data/upgrade/*.tar')
log.info('开始生成镜像') log.info('开始生成镜像')
for deploy_image in self.deploy_image_list: for deploy_image in self.deploy_image_list:
if not deploy_image: if not deploy_image:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment