docker search 和 docker pull 使用
时间:2022-11-08 13:30:00
目录
docker search
docker search hello-world
docker pull
docker pull --help
docker pull hello-world
docker pullredis: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 Supress 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 ~]#