I want to create a docker image with cassandra and already some keyspace/tables/data in it. The image is necessary for testing, and we have quite much data we need, so I don't want to load it in docker-entrypoint.sh, so that container gets up fast.
This is my simplified Dockerfile, but obviously it doesn't work:
FROM cassandra:3.11
COPY cql cql
RUN cqlsh -f /cql/001_create_keyspace.cql
As I just learned, cassandra is not running when I try to issue RUN cqlsh.
Is there some way to run it, load the data, and then stop cassandra? Or is there any other way to create cassandra image with the data already loaded?