I've installed Elasticsearch 6.2.1 via RPM but when I try to run it gives me on several files.
This is my Dockerfile:
ADD elasticsearch.repo /etc/yum.repos.d/elasticsearch.repo
RUN rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch &&
yum install -y --setopt=tsflags=nodocs --nogpgcheck
CMD ["sh", "/usr/share/elasticsearch/bin/elasticsearch"]
If I try to run build this image and run it will give me this err:
/usr/share/elasticsearch/bin/elasticsearch-env: line 70: /etc/sysconfig/elasticsearch: Permission denied
If I give permission for this file and try to run again. I will get other permission issues with var/lib/elasticsearch and var/log/elasticsearch.
I've also noticed that these file/directory are owned by elasticsearch group. I've tried to start elasticsearch as user 'elasticsearch' and it seems to work. However I wonder if there is any other way to run elasticsearch? Or is running as 'elasticsearch' user the standard way? Thanks.