docker镜像命令

该章节主要介绍docker image相关命令实践操作,建议都一起跑一边

1. docker images

列举本机docker镜像

[centos@jiliguo docker]$ docker images
REPOSITORY                     TAG                                 IMAGE ID            CREATED             SIZE
mysql                          wasabi                              8913c9fb0d59        27 hours ago        372MB
hyperledger/fabric-yxbaseos    amd64-latest                        c932070cd73f        2 weeks ago         156MB
hyperledger/fabric-yxbaseos    amd64-raft-1.2.1-snapshot-1f9bec2   c932070cd73f        2 weeks ago         156MB
hyperledger/fabric-yxbaseos    latest                              c932070cd73f        2 weeks ago         156MB

REPOSITORY:表示镜像的仓库源
TAG:镜像的标签
IMAGE ID:镜像ID
CREATED:镜像创建时间
SIZE:镜像大小

2. docker search

查找镜像

[centos@jiliguo docker]$ docker search  hello-world
NAME                                       DESCRIPTION                                     STARS               OFFICIAL            AUTOMATED
hello-world                                Hello World! (an example of minimal Dockeriz…   890                 [OK]
kitematic/hello-world-nginx                A light-weight nginx container that demonstr…   124
tutum/hello-world                          Image to test docker deployments. Has Apache…   60                                      [OK]
dockercloud/hello-world                    Hello World!                                    15                                      [OK]

3. docker pull

获取镜像

[centos@jiliguo docker]$ docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
1b930d010525: Already exists
Digest: sha256:92695bc579f31df7a63da6922075d0666e565ceccad16b59c3374d2cf4e8e50e
Status: Downloaded newer image for hello-world:latest
[centos@jiliguo docker]$ 

4. docker tag

设置镜像标签,这里只是多了个标签,并不是新的镜像

[centos@jiliguo docker]$ docker tag hello-world hello-world:v2

[centos@jiliguo docker]$ docker images
hello-world                    latest                              fce289e99eb9        3 months ago        1.84kB
hello-world                    v2                                  fce289e99eb9        3 months ago        1.84kB

5. docker save

把指定镜像保存成一个文件


[centos@jiliguo docker]$ docker save -o hello-world.tar或者 docker save hello-world:v2>hello-world.tar
[centos@jiliguo docker]$ ls
Dockerfile  hello-world.tar
[centos@jiliguo docker]$ 

6. docker rmi

删除镜像

[centos@jiliguo docker]$ docker rmi hello-world:v2
Untagged: hello-world:v2

7. docker load

加载镜像

[centos@jiliguo docker]$ docker load<hello-world.tar 或者docker load -i hello-world.tar
Loaded image: hello-world:v2

菜鸟系列docker——docker镜像中(4)的更多相关文章

  1. docker centos 镜像中安装python36详解!生成centos+python36的基础镜像

    获取centos镜像docker pull centos:7.4.1708 启动并进入centos的容器docker run -i –t centos /bin/bash下载安装python编译环境依 ...

  2. ARTS-S docker ceontos镜像中使用crontab

    centos镜像中默认没有crontab,需要在dockerflle中通过yum的安装 yum -y install vixie-cron crontabs && yum clean ...

  3. 在docker的镜像中安装vim

    在使用docker容器时,有时候里边没有安装vim,敲vim命令时提示说:vim: command not found,这个时候就需要安装vim,可是当你敲apt-get install vim命令时 ...

  4. 菜鸟系列docker——docker镜像下(5)

    1. docker镜像构建 该章节主要介绍2种构建docker镜像的方式.当然,当前基本上需要的基础镜像都有,直接使用即可.例如数据库.中间件之类的,只需要拿来使用即可,但是依然存在需要开发者构建镜像 ...

  5. 菜鸟系列docker——docker镜像上(3)

    1. 镜像image 镜像和容器的关系就和安装包和程序的关系一样,有了镜像才可以启动容器,容器是镜像的一个运行实例. 1.1 镜像的结构 通过第二节仓库,可能很多看官已经查看到镜像是分层的,接下来将对 ...

  6. Docker系列之Docker镜像(读书笔记)

    一.基本概念 Docker包括三个基本概念镜像.容器.仓库. Docker镜像:就是一个只读的模板.例如:一个镜像可以包含一个完整的ubuntu操作系统环境,里面仅安装了Apache或其他应用程序.用 ...

  7. Docker探索系列2之镜像打包与DockerFile

    preface docker基本入门以后,可以试试打包docker镜像与dockerfile了 docker镜像 docker hub仓库有2类仓库,用户仓库和顶层仓库,用户仓库由docker用户创建 ...

  8. SpringBoot系列: 制作Docker镜像的全过程

    本文主要参考了 https://segmentfault.com/a/1190000016449865 , 感谢作者的付出. 另外,  在本文中, 演示了Windows+Maven+Docker To ...

  9. 1. docker 在 macOS 中的架构 2. 在macOS系统中,docker pull 下来的镜像存储在哪里?

    docker 在 macOS 中的架构: 在macOS中,docker的实现跟在其它Linux系统中略有不同,在其它Linux系统中,操作系统本身就是docker容器的宿主机,docker镜像都是直接 ...

随机推荐

  1. 计算机爱好者协会技术贴markdown第四期

    首先先让爱酱用CSDN自带的数学公式方法来闪瞎大家的钛合金狗眼: 有没有感觉到Markdown的强大!!!!! ## KaTeX数学公式 您可以使用渲染LaTeX数学表达式 [KaTeX](https ...

  2. swagger 参数

    http://www.mamicode.com/info-detail-2213514.html

  3. Qt HID USB通讯错误

    1.下载hidapi库 链接:https://pan.baidu.com/s/1iQBuTxg-fReN-7GTrCT6SA 提取码:xzqw 2.把库加入qt 转自:https://www.cnbl ...

  4. sjms-2 创建型模式

    设计模式分类 创建型模式(5种):工厂方法模式.抽象工厂模式.创建者模式.原型模式.单例模式结构型模式(7种):适配器模式.桥模式.组合模式.装饰模式.外观模式.享元模式.代理模式行为型模式(11种) ...

  5. Maven学习笔记2(坐标和依赖)

    1.坐标 Maven坐标为各个构件建立了秩序,任何一个构件都必须明确自己的坐标,一个maven坐标是由一些元素确定的 <groupId>com.alivn.account</grou ...

  6. python for data analysis 2nd 读书笔记(一)

    第一章相对简单,也么有什么需要记录的内容,主要用到的工具的简介及环境配置,粗略的过一下就行了.下面我们开始第二章的学习 CHAPTER 22.2Python Language Basics, IPyt ...

  7. RabbitMQ Routing 消息路由

    上篇文章中,我们构建了一个简单的日志系统.接下来,我们将丰富它:能够使用不同的severity来监听不同等级的log.比如我们希望只有error的log才保存到磁盘上. 1. Bindings绑定 上 ...

  8. python基础自学 第一天

    python的概述 python的创始人:吉多·范罗苏姆 1991年,第一个python解释器诞生,用C语言实现,并能调用C语音的库文件 解释器(解释型语言和编 译型语言的区别) 把其他语言翻译成计算 ...

  9. 深入Java集合学习系列:LinkedHashMap的实现原理

    参考下面链接: http://zhangshixi.iteye.com/blog/673789

  10. Android 代码混淆配置总结

    一.前言 为何需要混淆呢?简单的说,就是将原本正常的项目文件,对其类,方法,字段,重新命名,a,b,c,d,e,f…之类的字母,达到混淆代码的目的,这样反编译出来,结构乱糟糟的,看了也头大. 另外说明 ...