Cassandra Persistrnce Storage?

Hi guys, I am using pokle/cassandra image.
I have few queries about data storage? I have a csv file which as 1 million records.

  1. Should/Can I store data in a container and create an image of it?
  2. If I close my container, data is lost…how to make it persistence?
  3. Is saving data on host the only option?

Quick reply is appreciated.
Thanks

i think you should use volumes here. just go through this video. https://docker.wistia.com/medias/6m689744b4 and also this might help https://docs.docker.com/engine/userguide/containers/dockervolumes/

Thank you…i will watch the video.
If the 1 Million data is only required for read only, can I just copy them to my container and create a new Image from that container, will the data persist for read only purpose?

I didn’t try this, just want to know if that possible or not.
Is there any downside for this?

It is not a good idea to container data in the docker image. Using the data volume would be the right way to access data inside container.

To make sure the data is read only, you could mount the volume as read only. See docker docs, https://docs.docker.com/engine/admin/volumes/volumes/#use-a-read-only-volume