(self, imagerepo, tag)
return files
Pull a docker image from a v2 registry or v1 index
Pull a docker image from a v2 registry or v1 index
Pull a docker image from a v2 registry or v1 index
def get(self, imagerepo, tag):
        """Pull a docker image from a v2 registry or v1 index"""
        Msg().out("Info: get imagerepo: %s tag: %s" % (imagerepo, tag),
                  l=Msg.DBG)
        (imagerepo, remoterepo) = self._parse_imagerepo(imagerepo)
        if self.localrepo.cd_imagerepo(imagerepo, tag):
            new_repo = False
        else:
            self.localrepo.setup_imagerepo(imagerepo)
            new_repo = True
        if self.is_v2():
            files = self.get_v2(remoterepo, tag)  # try v2
        else:
            files = self.get_v1(remoterepo, tag)  # try v1
        if new_repo and not files:
            self.localrepo.del_imagerepo(imagerepo, tag, False)
        return files
def get ( self , imagerepo , tag ) : Msg ( ) . out ( "Info: get imagerepo: %s tag: %s" % ( imagerepo , tag ) , l = Msg . DBG ) ( imagerepo , remoterepo ) = self . _parse_imagerepo ( imagerepo ) if self . localrepo . cd_imagerepo ( imagerepo , tag ) : new_repo = False else : self . localrepo . setup_imagerepo ( imagerepo ) new_repo = True if self . is_v2 ( ) : files = self . get_v2 ( remoterepo , tag ) # try v2 else : files = self . get_v1 ( remoterepo , tag ) # try v1 if new_repo and not files : self . localrepo . del_imagerepo ( imagerepo , tag , False ) return files