def do_load(self, cmdp):
"""
load: load a container image saved by docker with 'docker save'
load --input=<docker-saved-container-file>
load -i <docker-saved-container-file>
load < <docker-saved-container-file>
"""
imagefile = cmdp.get("--input=")
if not imagefile:
imagefile = cmdp.get("-i=")
if imagefile is False:
imagefile = "-"
if cmdp.missing_options(): # syntax error
return False
if not imagefile:
Msg().err("Error: must specify filename of docker exported image")
return False
repos = self.dockerlocalfileapi.load(imagefile)
if not repos:
Msg().err("Error: loading failed")
return False
else:
for repo_item in repos:
Msg().out(repo_item)
return True
评论列表
文章目录