提交 82d7fcc6 编写于 作者: T Tharun

address log and docs feedback

Signed-off-by: NTharun <rajendrantharun@live.com>
上级 b9b657ca
......@@ -128,7 +128,7 @@ var loadImageCmd = &cobra.Command{
var removeImageCmd = &cobra.Command{
Use: "rm IMAGE [IMAGE...]",
Short: "Remove one or more images",
Long: "Load a image into minikube",
Long: "Remove a image from minikube",
Example: "minikube image rm image busybox",
Run: func(cmd *cobra.Command, args []string) {
if len(args) == 0 {
......
......@@ -175,6 +175,9 @@ func (r *Docker) LoadImage(path string) error {
// RemoveImage removes a image
func (r *Docker) RemoveImage(name string) error {
klog.Infof("Removing image: %s", name)
if r.UseCRI {
return removeCRIImage(r.Runner, name)
}
c := exec.Command("docker", "rmi", name)
if _, err := r.Runner.RunCmd(c); err != nil {
return errors.Wrap(err, "remove image docker.")
......
......@@ -367,7 +367,7 @@ func RemoveImages(images []string, profiles []*config.Profile) error {
err = removeImages(c, cr, images)
if err != nil {
failed = append(failed, m)
klog.Warningf("Failed to load cached images for profile %s. make sure the profile is running. %v", pName, err)
klog.Warningf("Failed to remove images for profile %s. make sure the profile is running. %v", pName, err)
continue
}
succeeded = append(succeeded, m)
......@@ -375,7 +375,7 @@ func RemoveImages(images []string, profiles []*config.Profile) error {
}
}
klog.Infof("succeeded removing to: %s", strings.Join(succeeded, " "))
klog.Infof("failed removing to: %s", strings.Join(failed, " "))
klog.Infof("succeeded removing from: %s", strings.Join(succeeded, " "))
klog.Infof("failed removing from: %s", strings.Join(failed, " "))
return nil
}
......@@ -124,7 +124,7 @@ Remove one or more images
### Synopsis
Load a image into minikube
Remove a image from minikube
```shell
minikube image rm IMAGE [IMAGE...] [flags]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册