Creating and starting the Cassandra docker container

Start and initialize the local Cassandra container by running the following command in a Command Prompt.

docker run --name local-cassandra -dp 9042:9042 cassandra:4.0.5

This command creates and starts the Cassandra docker container. The container is named "local-cassandra", and the port for connecting to it is 9042. In this example, the version 4.0.5 is used, but it can be changed if another version is preferred. After the command has been executed, the container is visible in Docker Desktop.