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