4-Docker命令之docker rmi

2023-12-21 07:20:55

1.docker rmi介绍

docker rmi命令是用来删除本地一个或多个docker镜像

2.docker rmi用法

docker rmi [参数] IMAGE [IMAGE...]

[root@centos79 ~]# docker rmi --help

Usage:  docker rmi [OPTIONS] IMAGE [IMAGE...]

Remove one or more images

Aliases:
  docker image rm, docker image remove, docker rmi

Options:
  -f, --force      Force removal of the image
      --no-prune   Do not delete untagged parents
[root@centos79 ~]# 

3.实例

3.1.删除本地docker镜像

docker rmi centos:centos7 

[root@centos79 ~]# docker images | grep eeb6
centos                               centos7       eeb6ee3f44bd   2 years ago     204MB
[root@centos79 ~]# docker rmi centos:centos7 
Untagged: centos:centos7
Untagged: centos@sha256:9d4bcbbb213dfd745b58be38b13b996ebb5ac315fe75711bd618426a630e0987
Deleted: sha256:eeb6ee3f44bd0b5103bb561b4c16bcb82328cfe5809ab675bb17ab3a16c517c9
[root@centos79 ~]# docker images | grep e

文章来源:https://blog.csdn.net/z19861216/article/details/134800771
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。