Logstash in Docker - config file not found when mounted though a volume

天大地大妈咪最大 提交于 2019-11-29 08:47:06
VonC

If it is a "boot2docker" thing, remember that is offers you a Linux host based on Tiny core, without any persistence (except /var/lib/docker).

What I do is make sure the Oracle_VM_VirtualBox_Extension_Pack is installed, and get my /c/Users/<yourLogin> automatically shared in my boot2docker ssh session.
Whatever I need to keep is written there (/c/Users/<yourLogin>/...), not anywhere else.
If you have to mount a host directory as a data volume, you should mount a folder from /c/Users/<yourLogin>/....

The other option (which does persists) is to define a Data Volume Container, which will persists data in /var/lib/docker/volumes/conf.json, and (for the actual files) in /var/lib/docker/vfs/xxx.
That is the preferred best-practice as it doesn't link your data container to a specific host platform (here '/c/Users/<yourLogin> actually depends on the VM host, on Windows! Not very portable.)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!