Open Pusikas opened 4 years ago
Hello.
I'm having the same issue as you : java.nio.file.AccessDeniedException: /usr/share/elasticsearch/data/nodes
Because my data folder is empty, on both my host and container. Do you have any idea why ?
I'm not using podman, but docker rootless which should be pretty similar.
Thanks
This is my docker-compose.yml:
This is mostly from some example for setting up Graylog found on the web. We are trying to run rootless on RHEL 8.1. System uses cgroup v1. This is the uid map:
This is out podman:
Mongo seems to use uid 999 inside the container, elasticsearch uses 1000.
We are using podman-compose 0.1.6dev.
When I start do a
podman-compose up
, then MongoDB starts up nicely. Elasticsearch gives me the following error:java.nio.file.AccessDeniedException: /usr/share/elasticsearch/data/nodes
.This is the dry run:
I do not really understand why podman-compose first creates volumes and then bind mounts their directories. This seems to make a difference here.
As you can see, the
_data
dir's user was correctly changed for the MongoDB volume, but not for the Elasticsearch volume. If I stop the elasticsearch container, runpodman unshare chown 1000:1000 /home/plessy/.local/share/containers/storage/volumes/frank_es_data/_data
, and then then start it up again, then it works. It also works when I change the--mount type=bind,source=/home/plessy/.local/share/containers/storage/volumes/frank_es_data/_data,destination=/usr/share/elasticsearch/data,bind-propagation=z
to--mount type=volume,source=frank_es_data,destination=/usr/share/elasticsearch/data
.So, my question is: What am I doing wrong? And why doesn't podman-compose just use the containers it creates? Instead of using bind mounts on them?