[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
pujh/centos tomcat-centos 70ff7873d7cd About an hour ago MB
docker.io/centos latest 9f38484d220f days ago MB
[root@localhost ~]# docker tag 70ff7873d7cd my_centos:tomcat-centos
[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
my_centos tomcat-centos 70ff7873d7cd About an hour ago 612 MB
pujh/centos tomcat-centos 70ff7873d7cd About an hour ago MB
docker.io/centos latest 9f38484d220f days ago MB [root@localhost ~]# docker rmi 70ff7873d7cd
Error response from daemon: conflict: unable to delete 70ff7873d7cd (cannot be forced) - image is being used by running container 70859e710147
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
70859e710147 70ff "/bin/sh -c '/root..." About an hour ago Up About an hour 0.0.0.0:->/tcp dazzling_hopper
[root@localhost ~]# docker stop 70859e710147
[root@localhost ~]# docker rm 70859e710147 
[root@localhost ~]# docker rmi 70ff7873d7cd
[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
my_centos tomcat-centos 70ff7873d7cd About an hour ago 612 MB
docker.io/centos latest 9f38484d220f 11 days ago 202 MB
 

docker修改镜像名称的更多相关文章

  1. Docker 修改镜像源地址

    Docker 官方中国区 https://registry.docker-cn.com 网易 http://hub-mirror.c.163.com ustc https://docker.mirro ...

  2. docker 修改镜像和容器的存放路径(最新自己实践了第三种方法)

    docker info :查看docker的存储等相关信息. 将路径修改至挂载磁盘中 前提:磁盘已挂载成功 方法一: 1.停止docker 服务 service docker stop 2.备份数据到 ...

  3. docker 修改镜像地址

    一.直接设置 –registry-mirror 参数,仅对当前的命令有效 docker run hello-world --registry-mirror=https://docker.mirrors ...

  4. docker - 修改镜像/容器文件的在宿主机上的存储位置(转)

    背景 之前在使用docker的时候,由于启动container的时候用的是默认的mount(路径为 /var/lib/docker),这个目录对应的硬盘空间有限,只有200G左右.现在随着程序运行,有 ...

  5. docker - 修改镜像/容器文件或者 "Docker root dir" 的在宿主机上的存储位置

    背景 之前在使用docker的时候,由于启动container的时候用的是默认的mount(路径为 /var/lib/docker),这个目录对应的硬盘空间有限,只有200G左右.现在随着程序运行,有 ...

  6. Win10 Docker修改镜像存储位置

    发生现象: 在windows10下安装docker for windows,随着用docker pull image文件后,C盘的容量越来越小了,你可能也有一种跟我一样的想法,想改变默认的安装路径,本 ...

  7. docker 修改实例名称

    docker 容器(服务)重命名只要一个命令就可以: docker rename 原容器名 新容器名 如:

  8. Docker:镜像操作和容器操作

    镜像操作 列出镜像: $ sudo docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE hello-world latest 0a6b ...

  9. 庐山真面目之九微服务架构 NetCore 基于 Docker 基础镜像和挂载文件部署

    庐山真面目之九微服务架构 NetCore 基于 Docker 基础镜像和挂载文件部署 一.简介      我们在上一篇文章<庐山真面目之八微服务架构 NetCore 基于 Dockerfile ...

随机推荐

  1. pytest.7.常见套路

    From: http://www.testclass.net/pytest/common_useage/ 在使用pytest的时候,下面这些问题我们可能会经常遇到,这里给出官方的解决方案,按照套路来执 ...

  2. 前端模拟后台返回数据之Mockjs

    一.官方文档: https://github.com/nuysoft/Mock/wiki/Syntax-Specification 例子:http://mockjs.com/examples.html ...

  3. 不同安卓手机的 安卓版本不同,xpath元素也不同

    模拟器是 夜神模拟器 版本是 4.4.2 LG手机  版本是 8.0.0

  4. 廖雪峰Java4反射与泛型-3范型-6super通配符

    1.super通配符 1.1super通配符第一种用法 泛型的继承关系 Pair<Integer>不是Pair<Number>的子类,如 static void set(Pai ...

  5. HBase - Filter - 过滤器的介绍以及使用

    1 过滤器HBase 的基本 API,包括增.删.改.查等.增.删都是相对简单的操作,与传统的 RDBMS 相比,这里的查询操作略显苍白,只能根据特性的行键进行查询(Get)或者根据行键的范围来查询( ...

  6. [UE4]位与字节

    位 1.bit,比特 2.一个位可以表示两个值,0或者1(一个位只能表示0或者1,并不是能同时表示0和1). 3.一个位为什么只能是2个值,而不能是3个值呢?这是由于技术因素造成的,在硬件中,如果用一 ...

  7. @postconstruct初始化的操作(转载)

    原文地址:https://www.cnblogs.com/qingruihappy/p/7861623.html 从Java EE 5规范开始,Servlet中增加了两个影响Servlet生命周期的注 ...

  8. c#属性 ——面向对象

    String. Format(字符串格式化输出) 相当于Console.WriteLine(字符串格式化输出); 而String.Format是返回一个字符串 属性: 因为把字段全public,会非常 ...

  9. 谷歌获取chromium

    转自:http://blog.sina.com.cn/s/blog_496be0db0102voit.html 先参看 http://www.chromium.org/developers/how-t ...

  10. redis作为mysql的缓存服务器(读写分离)

    转自:https://www.iyunv.com/thread-52670-1-1.html 一.redis简介Redis是一个key-value存储系统.和Memcached类似,为了保证效率,数据 ...