Hello,
I am not quite sure if this is the right place to ask my question but I would like to try it, I am try to use volumes with docker-compose but everytime the Container try to mount the directory I get a “Permission denied”.
At the moment I have a compose-file with this content:
version: '2' services: cassandra: hostname: cassandra image: "cassandra:3.10" volumes: - ./target/database/data:/var/lib/cassandra container_name: cas_db mem_limit: 2g environment: ports: - 7000:7000 - 7001:7001 - 7199:7199 - 9042:9042 - 9160:9160
and parallel to this file I create a directory /target/database/data. But everytime I run
docker-compose up
I get the error:
Starting cas_db …
Starting cas_db … done
Attaching to cas_db
fid_db | chown: cannot read directory ‘/var/lib/cassandra’: Permission denied
fid_db exited with code 1
and this error appears if I run the command as cassandra and as root user. Maybe someones runs into the same Problem and can help me?
best regards
Dan