0
1

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

Dockerのimage名をrepositoryとtag名で検索する

Last updated at Posted at 2020-07-11

コマンド

  • docker images [OPTIONS] [REPOSITORY[:TAG]]

説明

docker images
REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
openjdk                 16-slim-buster      0b97ad2b2200        25 hours ago        417MB
openjdk                 16-jdk              b735a7317062        25 hours ago        500MB
mysql                   8.0.20              be0dbf01a0f3        4 weeks ago         541MB
quay.io/cybozu/golang   1.13-bionic         ec982649cca5        4 months ago        761MB
  • 上のような結果のときにREPOSITORYが openjdk のものだけを取り出したいとき
docker images openjdk
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
openjdk             16-slim-buster      0b97ad2b2200        25 hours ago        417MB
openjdk             16-jdk              b735a7317062        25 hours ago        500MB
  • タグ指定も出来る。
docker images openjdk:16-slim-buster
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
openjdk             16-slim-buster      0b97ad2b2200        25 hours ago        417MB
  • 部分一致も出来る

  • repository

docker images quay.io/*/*
REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
quay.io/cybozu/golang   1.13-bionic         ec982649cca5        4 months ago        761MB
  • tagの指定
docker images *:16-slim-buster
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
openjdk             16-slim-buster      0b97ad2b2200        25 hours ago        417MB
  • optionとの併用
docker images openjdk -qa
0b97ad2b2200
b735a7317062

終わりに

  • 今までずっとgrepかfilter使ってたけど、こっち使ったほうが便利。

参考

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?