理解docker镜像
镜像是用来启动容器的只读模板,是容器启动所需要的rootfs,类似于虚拟机所使用的镜像。
列出本机镜像
[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
busybox latest 020584afccce 7 days ago 1.22MB
[root@localhost ~]# docker images --help
Usage: docker images [OPTIONS] [REPOSITORY[:TAG]]
List images
Options:
-a, --all Show all images (default hides intermediate images) #列出所有镜像(默认是隐藏中间镜像)
--digests Show digests #列出镜像摘要。
-f, --filter filter Filter output based on conditions provided #条件过滤输出。
--format string Pretty-print images using a Go template #使用GO模板打印。
--no-trunc Don't truncate output #不截断输出。
-q, --quiet Only show numeric IDs #仅显示数字标识。
下载镜像
[root@localhost ~]# docker pull busybox
Using default tag: latest
latest: Pulling from library/busybox
Digest: sha256:1303dbf110c57f3edf68d9f5a16c082ec06c4cf7604831669faf2c712260b5a0
Status: Image is up to date for busybox:latest
docker.io/library/busybox:latest
导入导出镜像
[root@localhost ~]# docker save -o busybox.tar busybox
[root@localhost ~]# docker load -i busybox.tar
Loaded image: busybox:latest
运行镜像为容器
[root@localhost ~]# docker run busybox:latest
最新文章
- java中HashMap重要性质和优化总结
- windows下用虚拟机安装ubuntu
- SSO 登录功能的实现
- C++ 常用的字符串处理函数实现
- 使用IDEA运行Spark程序
- Learning ROS for Robotics Programming Second Edition学习笔记(三) indigo rplidar rviz slam
- goodbye 2018, hello 2019
- java安装与配置
- sqlserver中分区函数 partition by与 group by 区别 删除关键字段重复列
- ABP框架系列之五十一:(Timing-定时)
- js中push和pop的用法
- Elasticsearch集群内的原理
- ROS中遇到的一些问题和解决(更新)
- chrome 自动加载flash
- NSDictionary 详解
- (转)Oracle 12c Windows安装、介绍及简单使用(图文)
- Linux内核(16) - 高效学习Linux内核
- C语言关系运算符
- CentOS 7 下nagios搭建记录
- 简洁的一键SSH脚本
热门文章
- Linux:源代码安装及脚本安装的使用
- Vue动态加载图片图片不显示
- 【1期】Java必知必会之一
- cf之kmp匹配稍稍改一改
- shell登陆加载的文件, 快捷命令, tee管道, nohup和&;
- Eclipse maven创建web项目报错Could not resolve archetype
- Python进阶小结
- Mybatis智能标签
- 11-Django站点管理
- MyCat启动失败 Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: rebirth.a: rebirth.a: unknown error