简体   繁体   English

Docker 运行 -v 不同步

[英]Docker run -v not syncing

I am trying to spin a container from a docker image while using the -v option to mount a local volume.我试图在使用 -v 选项挂载本地卷时从 docker 映像旋转容器。 My understanding is that the container designated folder should sync up with the local directory, so that any update in any side is going to happen on the other side as well.我的理解是容器指定的文件夹应该与本地目录同步,这样任何一侧的任何更新也会发生在另一侧。

This is not happening though, the local files are not being copied to the container, and vice versa.但这并没有发生,本地文件没有被复制到容器中,反之亦然。 Is this not how it's supposed to work?这不是它应该如何工作吗?

Here is the command I use to spin the container:这是我用来旋转容器的命令:

docker run -dit --name zeppelin -p 4444:8080 -v /home/sammy/mnt/Zeppelin_Notebook:/zeppelin/notebook apache/zeppelin:0.9.0

I just figured out that I messed up the container path.我刚刚发现我弄乱了容器路径。 I needed /opt/ in front of /zeppelin/notebook.我需要 /opt/ 在 /zeppelin/notebook 前面。 Classic silly mistakes.经典的愚蠢错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM