Docker image 和 volume 的关系

image :镜像

虚拟机容器需要加载image才能运行,镜像中打包了构建好服务的运行环境。

Docker images are the basis of containers. An Image is an ordered collection of root filesystem changes and the corresponding execution parameters for use within a container runtime. An image typically contains a union of layered filesystems stacked on top of each other. An image does not have state and it never changes.

  翻译:docker 镜像 是容器的基础,image是根文件系统更改的有序集合,以及容器运行时中使用的相应执行参数。一个imgae通常包含一组层叠的文件系统。image没有状态,它永远不会改变。

volume :卷

volume 是一个负责 长期储存的一个docker服务方法

Volumes are the preferred mechanism for persisting data generated by and used by Docker containers

  翻译:volume是保存和使用生成的数据的首选途径

原文地址:https://www.cnblogs.com/zjhblogs/p/10862038.html