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

后端 未结 1 870
刺人心
刺人心 2020-12-18 13:57

EDIT: It seems to be a boot2docker thing... works fine in an ubuntu vm running docker.

I\'m trying to fire up logstash in a Docker container but whe

相关标签:
1条回答
  • 2020-12-18 14:39

    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.)

    0 讨论(0)
提交回复
热议问题