According to Docker documentations, docker image rm
"Remove one or more images" [1]. docker rmi
has a same description [2], but then it goes on to say "Removes (and un-tags) one or more images from the host node."
Do docker image rm IMAGE
and docker rmi IMAGE
have an identical effect under any scenario? IMAGE
is ID of the particular image that is to be removed.
The man page for docker rmi
specifies that docker rmi
is an alias for docker image rm
. I suppose the documentation from docker is a little bit inconsistent in that regard. They write all the details for docker rmi
while the documentation for docker image rm
is lackluster.
It looks like docker rm
is for containers and docker rmi
is for images.
PS C:\Users\3des> docker rm httpd --force
Error: No such container: httpd
PS C:\Users\3des> docker rm httpd
Error: No such container: httpd
______________________________________________
PS C:\Users\3des> docker rmi httpd --force
Untagged: httpd:latest
Untagged: httpd@sha256:2fab99fb3b1c7ddfa99d7dc55de8dad0a62dbe3e7c605d78ecbdf2c6c49fd636
``
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With