Docker镜像相关学习
镜像是什么?
先来看看 停止中国服务的docker 怎么说的:
info
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image which is based on the ubuntu image, but installs the Apache web server and your application, as well as the configuration details needed to make your application run.
巴啦啦一大堆,个人理解什么意思呢:
note
镜像就是 "java类",你在类里面可以定义方法、属性。同样你可以在pull下来的镜像中安装你所需要的东西。 java类可以 new 对象。docker images 就可以生成一个容器!💨容器相关链接
镜像命令
note
- 查询镜像列表表头含义介绍:
- REPOSITORY: 镜像名称
- TAG: 版本号
- IMAGES ID: 镜像ID
- CREATED: 创建时间
- SIZE: 镜像大小
docker images
查询本地镜像列表
docker images
docker images -q # 只显示镜像ID