To test Cassandra replication, I removed a container containing a Cassandra node. Then rebuilt the container. To attach the Cassandra node using an existing/replaced address, using instructions from Replace a dead node in Cassandra, the trick is to add
JVM_OPTS="$JVM_OPTS -Dcassandra.replace_address=x,x,x,x"
to the end of /etc/cassandra/cassandra-env.sh, and remove the line after the node has re-connected.