docker imagesを掃除しなかったら、いっぱいたまっていた。
docker(9) docker rmiのための順番
https://qiita.com/kaizen_nagoya/items/0bc05d08cf18af4a8801
に基づいて消そうとした。
$ docker stop $(docker ps -q)
$ docker rm $(docker ps -q -a)
...(成功)
$ docker rmi $(docker images -q)
Error response from daemon: conflict: unable to delete 863371d53d45 (must be forced) - image is referenced in multiple repositories
Error response from daemon: conflict: unable to delete 863371d53d45 (must be forced) - image is referenced in multiple repositories
Error response from daemon: conflict: unable to delete 83a10817c894 (cannot be forced) - image has dependent child images
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
kaizenjapan/http3a latest 863371d53d45 20 months ago 98.1MB
kaizenjapan/http3 <none> 863371d53d45 20 months ago 98.1MB
debian buster-slim 83a10817c894 21 months ago 69.2MB
$ docker stop $(docker ps -q) && docker rmi $(docker images -q) -f
"docker stop" requires at least 1 argument.
See 'docker stop --help'.
Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...]
Stop one or more running containers
あ、最後のは、psだともう空なのでエラーになる。
じゃ、後ろのコマンドだけやればいいかも。
$ docker rmi $(docker images -q) -f
Untagged: kaizenjapan/http3@sha256:9eebb10cce10c0013edb4823a9cb6e94262b0d8a4afaf17f7b6081d9097261aa
Untagged: kaizenjapan/http3a:latest
Deleted: sha256:863371d53d45245e40d89c4c85ff8d9a98518ea7fd38d607551c44f2fce95043
Deleted: sha256:13bfacbcc4d3f04e44fe26c9c4ef7e420ec73e3db4887c9b65b2f4c4df235d65
Deleted: sha256:a7762fd7c333728f2a1b9760a2730fe9367bafd2fffa985926ec89da95e29128
Deleted: sha256:f294c707aa848e1735edd957b4d5c217af694c08ead81a4b9f18fb1b7f86a9c7
Deleted: sha256:e0981118e0755ad0d3507c5e1001bb2353af574aea845f58880f6ebd63120e14
Deleted: sha256:9a0c5e6eed67994f420454d26f63886754867eb0abe4334ef3def8de07f7f9c9
Deleted: sha256:fe217160883dc8bb71309631a69e20a30952fd865d624dcb37a1d9449895b197
Deleted: sha256:e7f32d2648d39eee15099535f41f2f4712b01f0ad398dee9d23af38b1c877e4f
Deleted: sha256:9e9965a91d72fcc8cc2f6fc104de87d167aac168d71cee5c306774bd7535d6a8
Deleted: sha256:da30dbb82aae092dbeb93d402c2e9b5b21e9ae08f488f7d6c75aaec2f392000a
Deleted: sha256:1d8bc8a5205b530b95a684c926ec4653f5d2c4f2e9d0fbcbf91b79cdb1f27fd2
Deleted: sha256:3405ff28f2d9a2fe4c8310dabb47a0951bb234995ca9ddb561eb6471cbcc3f94
Deleted: sha256:6ce2a92c740c48391f5b8ed02e706601fc5e21ca9888ae4783235b271ad90ac1
Untagged: debian:buster-slim
Untagged: debian@sha256:6571c4636d0bb4e4eb0f14f557f8ba9b104fd194dc19241a564d3c3661ea5c30
Deleted: sha256:83a10817c894b381b377ba7492abd302ad027d95e2bb31168ae92069c6fefa89
Deleted: sha256:1c95c77433e8d7bf0f519c9d8c9ca967e2603f0defbf379130d9a841cca2e28e
Error: No such image: 863371d53d45
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
やった。消えた。
最後までおよみいただきありがとうございました。
いいね 💚、フォローをお願いします。
Thank you very much for reading to the last sentence.
Please press the like icon 💚 and follow me for your happy life.