diff --git a/cmd/kernel.go b/cmd/kernel.go index 9a1daaf..7363a26 100644 --- a/cmd/kernel.go +++ b/cmd/kernel.go @@ -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()) } diff --git a/container/container.go b/container/container.go index 0d58d6a..0e07c37 100644 --- a/container/container.go +++ b/container/container.go @@ -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() diff --git a/distro/opensuse/opensuse.go b/distro/opensuse/opensuse.go index 7927727..b785f3a 100644 --- a/distro/opensuse/opensuse.go +++ b/distro/opensuse/opensuse.go @@ -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 }