3
2

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 5 years have passed since last update.

docker の古い image を削除

Last updated at Posted at 2016-09-07

CI で docker build してると古い images が disk を圧迫して

Step 11 : ADD . ./
Untar re-exec error: exit status 1: output: write /app/assets/images/hoge.gif: no space left on device

みたいなことになるので、 docker build, push したあとに古い image を削除するコマンドを実行しておくとよい。

shell-session:直近 100 images より古い myimage と tag なしの image を削除
docker rmi -f $(docker images -q myimage | sed -n '100,$p') $(docker images -q --filter "dangling=true")

3
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
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?