parent
4a1422e010
commit
8251927821
@ -175,7 +175,7 @@ func (cmd *KernelCmd) fetchContainerCache(c container.Container) {
|
||||
}
|
||||
|
||||
path := cache.ContainerURL(c.Name())
|
||||
err := container.Load(path, c.Name())
|
||||
err := container.Import(path, c.Name())
|
||||
if err == nil {
|
||||
log.Info().Msgf("container %s -> %s", path, c.Name())
|
||||
}
|
||||
|
@ -77,13 +77,13 @@ func Images() (diis []Image, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func Load(path, name string) (err error) {
|
||||
func Import(path, name string) (err error) {
|
||||
exist := Container{name: name}.Exist()
|
||||
if exist && UseCache {
|
||||
return
|
||||
}
|
||||
|
||||
cmd := exec.Command(Runtime, "load", path, name)
|
||||
cmd := exec.Command(Runtime, "import", path, name)
|
||||
log.Debug().Msgf("%v", cmd)
|
||||
|
||||
raw, err := cmd.CombinedOutput()
|
||||
|
@ -53,14 +53,14 @@ func (suse OpenSUSE) Packages() (pkgs []string, err error) {
|
||||
}
|
||||
|
||||
cnturl := cache.ContainerURL(cnt)
|
||||
err = container.Load(cnturl, name)
|
||||
err = container.Import(cnturl, name)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
} else if strings.HasPrefix(suse.release, "13") {
|
||||
name = "opensuse:13"
|
||||
cnturl := cache.ContainerURL("openSUSE-13.2")
|
||||
err = container.Load(cnturl, name)
|
||||
err = container.Import(cnturl, name)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user