docker search 和 docker pull 使用

目录

docker search

 docker search hello-world

docker pull

 docker pull --help

docker pull hello-world

docker pull redis:6.0.8


docker search

在docker远程库里面搜索符合的镜像是否存在

[root@localhost ~]# docker search --help

Usage:  docker search [OPTIONS] TERM

Search the Docker Hub for images

Options:
  -f, --filter filter   Filter output based on conditions provided
      --format string   Pretty-print search using a Go template
      --limit int       Max number of search results (default 25)
      --no-trunc        Don't truncate output
[root@localhost ~]#

 docker search hello-world

搜索hello-world

[root@localhost ~]# docker search hello-world
NAME                                       DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
hello-world                                Hello World! (an example of minimal Dockeriz…   1787      [OK]
kitematic/hello-world-nginx                A light-weight nginx container that demonstr…   152
tutum/hello-world                          Image to test docker deployments. Has Apache…   89                   [OK]
dockercloud/hello-world                    Hello World!                                    19                   [OK]
crccheck/hello-world                       Hello World web server in under 2.5 MB          15                   [OK]
vad1mo/hello-world-rest                    A simple REST Service that echoes back all t…   5                    [OK]
ansibleplaybookbundle/hello-world-db-apb   An APB which deploys a sample Hello World! a…   2                    [OK]
ppc64le/hello-world                        Hello World! (an example of minimal Dockeriz…   2
infrastructureascode/hello-world           A tiny "Hello World" web server with a healt…   1                    [OK]
thomaspoignant/hello-world-rest-json       This project is a REST hello-world API to bu…   1
rancher/hello-world                                                                        1
ansibleplaybookbundle/hello-world-apb      An APB which deploys a sample Hello World! a…   1                    [OK]
businessgeeks00/hello-world-nodejs                                                         0
strimzi/hello-world-producer                                                               0
freddiedevops/hello-world-spring-boot                                                      0
koudaiii/hello-world                                                                       0
strimzi/hello-world-consumer                                                               0
garystafford/hello-world                   Simple hello-world Spring Boot service for t…   0                    [OK]
strimzi/hello-world-streams                                                                0
tsepotesting123/hello-world                                                                0
kevindockercompany/hello-world                                                             0
dandando/hello-world-dotnet                                                                0
armswdev/c-hello-world                     Simple hello-world C program on Alpine Linux…   0
okteto/hello-world                                                                         0
rsperling/hello-world3                                                                     0
[root@localhost ~]#

STARS 表示点赞数

OFFICIAL 是否官方认证

AUTOMATED 是否自动构建

docker pull

 docker pull --help

[root@localhost ~]# docker pull --help

Usage:  docker pull [OPTIONS] NAME[:TAG|@DIGEST]

Pull an image or a repository from a registry

Options:
  -a, --all-tags                Download all tagged images in the repository
      --disable-content-trust   Skip image verification (default true)
      --platform string         Set platform if server is multi-platform capable
  -q, --quiet                   Suppress verbose output
[root@localhost ~]#

docker pull hello-world

不指定tag,默认使用latest (Using default tag: latest)

[root@localhost ~]# docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
Digest: sha256:13e367d31ae85359f42d637adf6da428f76d75dc9afeb3c21faea0d976f5c651
Status: Image is up to date for hello-world:latest
docker.io/library/hello-world:latest
[root@localhost ~]#

[root@localhost ~]# docker images
REPOSITORY    TAG       IMAGE ID       CREATED        SIZE
hello-world   latest    feb5d9fea6a5   9 months ago   13.3kB
[root@localhost ~]#

docker pull redis:6.0.8

带标签版本号下载镜像 

[root@localhost ~]# docker pull redis:6.0.8
6.0.8: Pulling from library/redis
bb79b6b2107f: Pull complete
1ed3521a5dcb: Pull complete
5999b99cee8f: Pull complete
3f806f5245c9: Pull complete
f8a4497572b2: Pull complete
eafe3b6b8d06: Pull complete
Digest: sha256:21db12e5ab3cc343e9376d655e8eabbdbe5516801373e95a8a9e66010c5b8819
Status: Downloaded newer image for redis:6.0.8
docker.io/library/redis:6.0.8
[root@localhost ~]# docker images
REPOSITORY    TAG       IMAGE ID       CREATED         SIZE
ubuntu        latest    27941809078c   4 weeks ago     77.8MB
hello-world   latest    feb5d9fea6a5   9 months ago    13.3kB
redis         6.0.8     16ecd2772934   20 months ago   104MB
[root@localhost ~]#

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

haowll

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值