18、Docker命令-镜像仓库

文章目录

login

docker login 网址 -u 用户名 -p 密码 

logout

docker logout 网址

search

备注:
1.只会查询到docker hub 网址的镜像
2.AUTOMATED:github账户连接到docker hub,github 代码更新,就会触发自动创建image,并推送到docker-hub

docker search [OPTIONS] TERM
 -f,  --filter filter   	根据关键字进行过滤(不常用)
      --format string       输出结果格式化(不常用)
      --limit int           限制搜索的条目(不常用)
      --no-trunc            显示描述的详细信息(不常用)
举例:
$ docker search busybox
NAME                             DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
busybox                          Busybox base image.                             316       [OK]
progrium/busybox                                                                 50                   [OK]
radial/busyboxplus               Full-chain, Internet enabled, busybox made...   8                    [OK]
odise/busybox-python                                                             2                    [OK]
azukiapp/busybox                 This image is meant to be used as the base...   2                    [OK]
ofayau/busybox-jvm               Prepare busybox to install a 32 bits JVM.       1                    [OK]
shingonoide/archlinux-busybox    Arch Linux, a lightweight and flexible Lin...   1                    [OK]
odise/busybox-curl                                                               1                    [OK]
$ docker search --filter stars=3 busybox  说明:start>3
$ docker search --filter is-official=true busybox 说明:官方镜像
$ docker search --filter is-automated=true busybox 说明:可以自动build镜像
$ docker search --format "{
    
    {.Name}}: {
    
    {.StarCount}}" nginx

nginx: 5441
jwilder/nginx-proxy: 953
richarvey/nginx-php-fpm: 353
million12/nginx-php: 75
webdevops/php-nginx: 70
h3nrik/nginx-ldap: 35
bitnami/nginx: 23
evild/alpine-nginx: 14
million12/nginx: 9
maxexcloo/nginx: 7

$ docker search --format "table {
    
    {.Name}}\t{
    
    {.IsAutomated}}\t{
    
    {.IsOfficial}}" nginx

NAME                                     AUTOMATED           OFFICIAL
nginx                                                        [OK]
jwilder/nginx-proxy                      [OK]
richarvey/nginx-php-fpm                  [OK]
jrcs/letsencrypt-nginx-proxy-companion   [OK]
million12/nginx-php                      [OK]
webdevops/php-nginx                      [OK]
Parent command

$ docker search --no-trunc redis 说明:显示详细的描述信息
$ docker search redis --limit 5  说明:显示五条数据

pull

docker pull [OPTIONS] NAME[:TAG|@DIGEST]
-a, --all-tags                  下载所有的tag版本
    --disable-content-trust     下载跳过证书验证,默认为true
     -q, --quiet                不显示输出信息

push

docker push [OPTIONS] NAME[:TAG]
Options:
      --disable-content-trust   跳过证书验证,默认为true

猜你喜欢

转载自blog.csdn.net/weixin_43443216/article/details/111991228