This is obviously a bit hacky and would probably wipe out the traces when the pod restarts.
It think that there should be some way of persisting the /cassandra/data directory built by docker build if people want to mount persistent volumes like this.
This is a strange one so I'll just write out the timeline of what happens and then discuss possible fixes.
ENSURE_SCHEMA=true
/cassandra/data
. This deletes the schema installed by step 1I was able to work around this by adding the line
cp -R /cassandra/data/ /cassandra/data-tmp/
after this line.Then
cp -rf /cassandra/data-tmp/* /cassandra/data/
before cassandra startsThis is obviously a bit hacky and would probably wipe out the traces when the pod restarts.
It think that there should be some way of persisting the
/cassandra/data
directory built bydocker build
if people want to mount persistent volumes like this.