'docker: Error response from daemon: network cassandra not found

I am following the guide given on the official website(https://cassandra.apache.org/_/quickstart.html) I don't have much experience with docker so I need help, what can I do to make this work.

first I run this

docker run --name cassandra cassandra

2nd

docker run --rm -d --name cassandra_host --hostname cassandra_host --network cassandra cassandra

and I get the below error

docker: Error response from daemon: network Cassandra not found.


Solution 1:[1]

We're sorry about this. This is an error in our docs and we have a scheduled update to the site soon to fix this (CASSANDRA-17485).

In the meantime, the command to create a Docker network is:

$ docker network create cassandra

Then you should be able to start the container with:

docker run --rm -d 
  --name cassandra 
  --hostname cassandra 
  --network cassandra 
  cassandra

Cheers!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1