LoginSignup
0
2

More than 5 years have passed since last update.

全ての Docker Image, tag を消すワンライナー

Last updated at Posted at 2017-12-28

諸事情で Image が大量に出来てしまった場合に...

docker images --format "{{.Repository}}:{{.Tag}}" | xargs docker rmi

コンテナが稼働しているImageはErrorになるので、消えないです。
オススメではないですが、それも強制的に消したいなら -f option を付けます。

中間Imageのゴミ <none> だけを消したい時はこうです。

docker image prune

もしくは ↓ で、Imageだけでなく、不要なコンテナ、ネットワークも一括で削除できます。

docker system prune
0
2
0

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
2