How can I access cassandra.yaml in Docker?

Author: RezaRastgoo

Originally Sourced from: https://stackoverflow.com/questions/73516670/how-can-i-access-to-cassandra-yaml-in-docker

I use cassandra image to create cassnadra container. I use volumes as follow:

- ./samt_tmp/cassandra_data/cassandra:/etc/cassandra/

I want create cassandra.yaml from docker in my pc but this path isn't exist.

sed: can't read /etc/cassandra/cassandra.yaml: No such file or directory

while can copy from this directory. why can't create volume from directory? how can create cassandra.yaml volume ?