Volume isn’t created in Scylla when using docker-compose in Windows 10

  docker, docker-compose, scylla

I just started learning Docker and docker-compose and I want to try out ScyllaDB (database). I want to start a single instance of ScyllaDB in Docker through docker-compose with persistent storage. The persistent storage should be saved in folder ‘target’ relative to my docker-compose file. The problem is that I don’t see any folder being created, but docker-compose seems to persist the data, but I am not sure where I can locate the files that ScyllaDB created. Step by step reproduction path:

  1. Create a docker-compose.yml with the following content (/var/lib/scylla should be correct according to https://docs.scylladb.com/operating-scylla/procedures/tips/best_practices_scylla_on_docker/):

docker-compose.yml

version: '3'

services:
  b-scylla:
    image: "scylladb/scylla:4.3.1"
    container_name: b-scylla
    volumes:
      - ./target:/var/lib/scylla
    ports:
      - "127.0.0.1:9042:9042"
      - "127.0.0.1:9160:9160"
  1. This does not give any result: $ docker volume ls
  2. Start up docker-compose and wait a minute for ScyllaDB to start up: $ docker-compose up -d
  3. This does still not give any result: $ docker volume ls. I expect that Docker should created a volume (./target/).
  4. Persist some data in ScyllaDB to verify that the data is saved somewhere:

Run the following commands:

$ docker exec -it b-scylla cqlsh
$ create keyspace somekeyspace with replication = {
    'class': 'NetworkTopologyStrategy',
    'replication_factor': 2
};
  1. The created keyspace is saved somewhere, but I don’t know where. I would expect it is just in the target folder, but that folder isn’t even created. When I restart docker-compose, the keyspace is still present, so the data is saved somewhere, but where?

Source: Docker Questions

LEAVE A COMMENT