zoukankan      html  css  js  c++  java
  • docker场景学习

    https://docs.docker.com/engine/reference/commandline

    1.镜像相关 以redis为例

    ##搜索镜像## Search the Docker Hub for images

    docker search <name>

    Usage:  docker search [OPTIONS] TERM
    Search the Docker Hub for images
    Options:
      -f, --filter filter   Filter output based on conditions provided  根据条件过滤输出
    过滤标记(-f或--filter)格式为一key=value对。如果有多个过滤器,则传递多个标志(例如--filter is-automated=true --filter stars=3)
    
    当前支持的过滤器是:The currently supported filters are:
    
    stars (int - number of stars the image has)         星星(整数-图像具有的星星数) 
    is-automated (boolean - true or false) - is the image automated or not   图像是否自动
    
    is-official (boolean - true or false) - is the image official or not 是官方的(布尔值-正确或错误)-图片是否正式
          --format string   Pretty-print search using a Go template     根据Go模板进行漂亮的打印输出
          --limit int       Max number of search results (default 25)   最多搜索结果输,默认25。此值的范围可以是1到100。
          --no-trunc        Don't truncate output                       不要截断输出,Description显示完整的镜像描述;
    $ docker search redis
    NAME                             DESCRIPTION                                     STARS               OFFICIAL            AUTOMATED
    redis                            Redis is an open source key-value store that…   8716                [OK]
    bitnami/redis                    Bitnami Redis Docker Image                      165                                     [OK]
    sameersbn/redis                                                                  82                                      [OK]
    grokzen/redis-cluster            Redis cluster 3.0, 3.2, 4.0, 5.0, 6.0           72
    ....
    镜像名称 镜像描述 点赞数 是否docker官方发布 是否自动构建(是否是dockerfile构建)

    关于自动构建镜像:

    自动化构建,就是使用Docker Hub连接一个包含Dockerfile文件的GitHub仓库或者BitBucket仓库,Docker Hub则会自动构建镜像,通过这种方式构建出来的镜像会被标记为Automated Build,也称之为受信构建(Trusted Build),这种构建方式构建出来的镜像,其他人在使用时可以自由的查看Dockerfile内容,知道该镜像是怎么来的,同时,由于构建过程是自动的,所以能够确保仓库中的镜像都是最新的。

    ##拉取镜像##

    $ 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 下载存储库中所有标记的图像,如果未提供标签,则Docker Engine将使用该:latest标签作为默认标签。此命令将拉出debian:latest图像:
          --disable-content-trust   Skip image verification (default true) 跳过图像验证,默认true

    如果未提供标签,则Docker Engine将使用该:latest标签作为默认标签。此命令将拉出debian:latest图像:

    注意:

    Docker images can consist of multiple layers. In the example above, the image consists of two layers; fdd5d7827f33 and a3ed95caeb02.

    Layers can be reused by images. For example, the debian:jessie image shares both layers with debian:latest. Pulling the debian:jessie image therefore only pulls its metadata, but not its layers, because all layers are already present locally:

    ##启动镜像##

    ##启动镜像##

  • 相关阅读:
    Synchronized 在 java 中的用法
    ExtJS写的小系统,有源码,献给刚入门的朋友。
    轻松实现Apache,Tomcat集群和负载均衡
    dbms_stats使用(转)
    Java关键字final、static使用总结
    java参数传递总结
    持久化上下文的传播
    主题:Spring Security 2 配置精讲
    Tomcat中web.xml文件的详细说明
    如何学习Ext
  • 原文地址:https://www.cnblogs.com/roger888/p/13924577.html
Copyright © 2011-2022 走看看