0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

docker image rm でNo such image エラー:解決

Last updated at Posted at 2023-04-15

環境

・Docker Desktop for windows 4.18.0
・Docker version 20.10.24
・windows11 home
・Windows PowerShell 7.3.3

前提

docker compose をやった後にdocker compose down でコンテナ等削除。
イメージとボリュームはdownで自動削除されないので、自分で削除しようとしたところ、イメージの削除でエラー発生。

現象

> docker image ls
REPOSITORY                    TAG       IMAGE ID       CREATED        SIZE
mysql                         5.7       3f3447deacaa   2 weeks ago    455MB

この状態で、mysqlイメージを消そうとすると、
No such image: mysql
エラー。ちなみに他のイメージは正常に削除できた。

> docker image rm mysql
Error: No such image: mysql

そこで、lsコマンドで表示された「IMAGE ID」で指定すると削除できた。解決。

> docker image rm 3f3447deacaa
Untagged: mysql:5.7
Untagged: mysql@sha256:bf18020f32cc5d8f5e2add516d52fbf3afc3de431457076340e938596c528171
Deleted: sha256:3f3447deacaa5bacab184fabbf821a785e13303b2e340465bdf7815b0284497b
Deleted: sha256:b51c74300d68b9b3950240d8603e4d36d317a9b142f321590cf63c3e0de54c8b
Deleted: sha256:4978400ffc88fb08ad9078f54b9c0b7bbdeb974eb47254bef400c3afcb1a5f64
Deleted: sha256:415ae5176ec060ee20567260329c59249ac0a14ace1231bd900b06160f1bf13a
Deleted: sha256:5ca10ce25add112849f8f21284987d8a979ec7da062bf19b4dec85eb2408223e
Deleted: sha256:56a19ae8978a0c01051769af8fdc0ddc3356f117b194e4c7db9d39d3e81a4b56
Deleted: sha256:0c03f32323e91eefa53c41b1fe030e2278dd7ce87cb854da695b03125e9db2cc
Deleted: sha256:38700ee823d5d82b695bb7d553973c0106384a6984b553e2af6d6fb9545d9636
Deleted: sha256:7cfca860605c4f16b1f255ebd51e2c801e00ac16997c7840428f88a2246cfebb
Deleted: sha256:0d8a62cb129e3cebaaef51f977b670282775d48a9cdaa021a0cb5ed73243a446
Deleted: sha256:66e6e199acb7395ac9a10b125841eafdfa3f80a1a3f710e0a0a9519da228bce2
Deleted: sha256:e74a57638021cebbbe0dda98a27675f9b53258050ee2c29c3e5fb7fb1f3ab533
0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?