Docker 运行命令可以选择将主机目录挂载到容器中
-v=[]: Create a bind mount with: [host-dir]:[container-dir]:[rw|ro].
If "host-dir" is missing, then docker creates a new volume.
并且 Dockerfile 有VOLUME
指令
VOLUME ["/data"] - The VOLUME instruction will add one or more new volumes
to any container created from the image.
据我host-dir
所知,使用 Dockerfile 时无法指定或 rw/ro 状态。
除了想与其他容器共享之外,docker 文件中是否还有其他用途?