Docker does not seem to be persisting container (cassandra) data when I stop/start or when I commit/save to an image and run the image.
so I create few keyspaces and add some data, but when I stop/start container, it is gone whereas the schema exists?
Same with commiting the container as an image and running the image does not show any data.
– get an image and run it
winpty docker run -it --rm --net container:cassone a5260a399872 cqlsh
docker run -P -v //c//docker-workspace/shared:/shared f7ba11a14507
– login to container modify data
winpty docker exec -it 621b092bd27c bash
– create a new image from running container
docker commit -a “kris” -m “cassandra with schema and data -v3” 5e39051f249e krishna-cassandra-with-schema-and-data-v3
– get the new image
– run the new image in a new container << no cassandra data
docker run -P -v //c/docker-workspace/shared:/shared 5d9229545fb9
winpty docker exec -it dc06a73b24fd bash
– stop/start old container << loose cassandra data