I was playing around with DataStax DSE Docker image using Docker Compose and noticed that the Docker volumes were not mounted. I was able to solve the issue by using named volume mounts (Docker Compose v3).
Not Working Docker Compose YAML
version: "2" services: dse01: volumes: - /mnt/dse/data/cassandra:/var/lib/cassandra - /mnt/dse/data/spark:/var/lib/spark
Working Docker Compose YAML
version: "3.2" services: dse01: volumes: - type: bind source: /mnt/dse/data/cassandra target: /var/lib/cassandra - type: bind source: /mnt/dse/data/spark target: /var/lib/spark
If you are using Docker run command refer the following syntax
docker run .... --mount source=/mnt/dse/data/cassandra,target=/var/lib/cassandra .... datastax/dse-server