I want to attach persistent storage to my docker containers. I have tried NFS using TrueNAS and seem to have no luck there.
Surely, I am approaching this in the wrong way. What are the common conventions for attaching persistent storage OUTSIDE of the container so that if the container fails or is remade, the data is re-attached or at the very least remains existent.
EDIT: Apologies for the confusion. I am not talking about bind mounts or volumes, I am well aware of those technologies. I am referring to the underlying filesystems i.e. NFS etc.. are there standard toolings or management systems e.g. Longhorn for block storage on kubernetes. is it better to use a file, object, or block storage solution etc...
EDIT 2: I have ready everything in the Docker docs. I know about volumes and drivers. What I don't know is how to use them properly with respective options as they are not documented properly, or how these things are commonly installed into a solution. Yes I can just "use the driver" but how exactly? Is NFS a common theme? What about block storage? Object storage? How is this architected on a system level.
EDIT: I'm adding this edit because some weasal closed it for not being specific enough. As if asking about this problem isn't relevant. I'm the only one with had an actual answer. Not even the common users of docker have a clue as to how this all works under the hood. You don't think we should have a post about that question? Oh no of course not.. just have ppl repeat the same shit over and over again.