Posts

Showing posts from August, 2025

Running cassandra on docker

1) https://cassandra.apache.org/doc/latest/cassandra/getting-started/cassandra-quickstart.html#step-1-get-cassandra-using-docker 2) Run this ` docker pull cassandra:latest` 3) Then, run this,       ` docker network create cassandra   docker run --rm -d --name cassandra --hostname cassandra --network cassandra cassandra` This creates a container called 'cassandra' within the 'cassandra' network   4) Then, run this docker run -it --name cql-client --network cassandra -v "C:/Users/nic35/a.cql:/scripts/data.cql" -e CQLSH_HOST=cassandra -e CQLSH_PORT=9042 -e CQLVERSION=3.4.7 nuvo/docker-cqlsh bash This creates a container called 'cql-client' basing on 'nuvo/docker-cqlsh' image, within the 'cassandra' network, and passing in a few other environment variables. 5) Then, run cqlsh in the bash prompt. Note: If you ever want to run the bash prompt again, do `docker exec -it cql-client bash`