zoukankan      html  css  js  c++  java
  • Docker(9)- docker pull 命令详解

    如果你还想从头学起 Docker,可以看看这个系列的文章哦!

    https://www.cnblogs.com/poloyy/category/1870863.html

    作用

    从镜像仓库中拉取或更新镜像

    语法格式

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

    TAG:标签,不写的话默认是 latest 最新版 

    看看 docker-hub 上的 Tag

    options 说明

    option 作用
    -a, --all-tags 拉取所有 tagged 镜像
    --disable-content-trust  忽略镜像的校验,默认开启
    -q, --quiet 概要输出
    --platform string 若服务支持多平台,这里可以设置平台

    实际栗子

    从 Docker Hub下载java最新版镜像

    docker pull java 

    从 Docker Hub下载 REPOSITORY 为 java 的所有镜像

    docker pull -a java

    下载镜像的过程

    [root@iz2zeak7sgj6i7hrb2g862z ~]# docker pull tomcat:8
    8: Pulling from library/tomcat #如果不写tag,默认就是latest
    90fe46dd8199: Already exists   #分层下载: docker image 的核心 联合文件系统
    35a4f1977689: Already exists   # Alrea exists 表示本地已存在对应的文件,不需要重复下载,提高速度,减少内存占用率
    bbc37f14aded: Already exists 
    74e27dc593d4: Already exists 
    93a01fbfad7f: Already exists 
    1478df405869: Pull complete    # 本地没有对应的文件,需要下载,后面再用到该文件的时候就不用再下载了
    64f0dd11682b: Pull complete 
    68ff4e050d11: Pull complete 
    f576086003cf: Pull complete 
    3b72593ce10e: Pull complete 
    Digest: sha256:0c6234e7ec9d10ab32c06423ab829b32e3183ba5bf2620ee66de866df # 签名防伪
    Status: Downloaded newer image for tomcat:8
    docker.io/library/tomcat:8 # 真实地址

    等价写法

    docker pull tomcat:8
    docker pull docker.io/library/tomcat:8
  • 相关阅读:
    蛇形填数
    开灯问题
    水仙花数
    C++Primer笔记-----day02
    C++Primer笔记-----day01
    面试智力题
    maven 打包197
    子系统 安装vsftpd197
    office 安装破解197
    oracle 创建多个数据库197
  • 原文地址:https://www.cnblogs.com/poloyy/p/13922357.html
Copyright © 2011-2022 走看看