Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
32
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

@foursue

docker system df と docker system prune を使ってみた

dockerの1.13から便利なコマンドが増えたので、遅ればせながら試してみました。

開発しながらだと使い捨てのイメージやボリュームが溜まりがちなので、きれいになってスッキリしました。
Dockerでディスク容量が圧迫されて、困る前に実行してみてください。


$ docker system df
TYPE                TOTAL               ACTIVE              SIZE                RECLAIMABLE
Images              51                  12                  13.8GB              12.64GB (91%)
Containers          14                  0                   2.379GB             2.379GB (100%)
Local Volumes       47                  4                   6.754GB             5.841GB (86%)
$ docker system prune
WARNING! This will remove:
    - all stopped containers
    - all volumes not used by at least one container
    - all networks not used by at least one container
    - all dangling images
Are you sure you want to continue? [y/N] y
〜〜中略〜〜

$ docker system df
TYPE                TOTAL               ACTIVE              SIZE                RECLAIMABLE
Images              39                  0                   13.8GB              13.8GB (100%)
Containers          0                   0                   0B                  0B
Local Volumes       0                   0                   0B                  0B
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
32
Help us understand the problem. What are the problem?