LoginSignup
1
2

More than 5 years have passed since last update.

取得済み Docker image を全て更新するワンライナー

Posted at

Dockerを使っていると大量のイメージがローカルに溜まってきますよね。
そのイメージを更新するためにはいちいちpullしなくちゃならないのがダルい。

ネットを漁ってみましたがタグを指定して持ってくる例が見つからない。(わたしのggりスキルひくっ!)

そんなわけで書きました。

docker images | grep -v "REPOSITORY" | grep -v "<none>" | awk '{ printf "%s:%s\n",$1,$2 }' | xargs -n1 docker pull

awkとxargsはなにかと便利。

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