I’m new in docker. My first docker is cacti with this image : Docker Hub
I run this in docker desktop for windows under windows 10.
As describe, volumes have been created for 5 mount points.
But I try adding a file in a path that is not in persistant directory, and after a restart of the container, the file was still there. So I don’t understand why?
The persistante volumes of this container :
The file I add:
So why the file is persisting and where is it saved?
Because the container is still the same, a container can handle a start/stop or a restart of the host, without loosing data.
When we talk persistant storage, its because if you ever need to update/move a container, you need to delete and create it again, you cant edit fx. ports on a existing container, so if you ever “docker rm CONTAINER”, the data is gone, unless you mounted a volume into the container, then the data is still there, in the volume, so the next time you use “docker run …” with the volume, the data is back.
Hope that makes sense
Thank you for your replie.
I understand it’s ok.
Thank you for your replie. I understand.
Now I’ve an other question. My data persisting under the container until I don’t remove it. So now I’ve a look on the “containers” folder.
I’ve found my containers here :
And when I browse the container, I didn’t find the file I had created.
It is normally under /var/www/html/cacti/scripts/liveb.sh
There is “checkpoint” and “mounts” directory (empties), and some other files in the root directory. But where could be stored my file inside the container ?