Open Menturan opened 5 years ago
Hi there... I am very new 6 weeks to be exact in working with Docker and Ubuntu..
I have learnt a lot in the last 4 weeks about Docker and can answer your question if you never found out. I stumbled across this looking for something else.
When you mount a Folder in this way your are basically mounting or re-directing (however you mind thinks : ) the localhost folder before the : to a folder inside the container that is running the image with Kapacitor in it. That will be buried in the /var/ folder hiding.. :)
So when data is written from Kapacitor to the : /var/lib/kapacitor folder in the container location it is actually being written to the folder that is on the left of the : in your case /var/metrics/data/kapacitor
So you have to think about Left=Local:Right=Remote (or random, whatever word reminds you) :)
I hope this rather long explanation helps... It took me 20 -30 hrs to get my head around -v and now the new volumes: -- commands in the docker-compose.yaml files.
Cheers.
This issue is related to issue #56.
Data from kapacitor didn’t show up at the volume mounting point on the host. Below is a part of my docker-compose file:
After investigating inside the docker container to find out where the kapacitor data were stored I found it at
/root/.kapacitor
. I changed the mapping to this folder and the everything works fine.Why isn’t the data stored in
/var/lib/kapacitor
?Looking at the config that’s being copied in the Dockerfile, it looks fine.