{"action":"created","issue":{"url":"https://api.github.com/repos/spujadas/elk-docker/issues/87","repository_url":"https://api.github.com/repos/spujadas/elk-docker","labels_url":"https://api.github.com/repos/spujadas/elk-docker/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/spujadas/elk-docker/issues/87/comments","events_url":"https://api.github.com/repos/spujadas/elk-docker/issues/87/events","html_url":"https://github.com/spujadas/elk-docker/issues/87","id":189552627,"number":87,"title":"ERROR: don't run elasticsearch as root","user":{"login":"animageofmine","id":6426633,"avatar_url":"https://avatars.githubusercontent.com/u/6426633?v=3","gravatar_id":"","url":"https://api.github.com/users/animageofmine","html_url":"https://github.com/animageofmine","followers_url":"https://api.github.com/users/animageofmine/followers","following_url":"https://api.github.com/users/animageofmine/following{/other_user}","gists_url":"https://api.github.com/users/animageofmine/gists{/gist_id}","starred_url":"https://api.github.com/users/animageofmine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/animageofmine/subscriptions","organizations_url":"https://api.github.com/users/animageofmine/orgs","repos_url":"https://api.github.com/users/animageofmine/repos","events_url":"https://api.github.com/users/animageofmine/events{/privacy}","received_events_url":"https://api.github.com/users/animageofmine/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-11-16T00:57:26Z","updated_at":"2016-11-17T21:10:36Z","closed_at":"2016-11-17T21:10:36Z","body":"I tried to run the container with additional elasticsearch parameters (tag = es240_l240_k460)\r\n\r\n`docker run --name elknode01 --net=es-network --restart always -p 9200:9200 -p 9300:9300 -p 5601:5601 myelkimage elasticsearch -Des.cluster.name=cluster-01 -Des.node.master=true -Des.node.name=node01\r\n`\r\n\r\nI get the following error: \r\n\r\nException in thread \"main\" java.lang.RuntimeException: don't run elasticsearch as root.\r\n\tat org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:94)\r\n\tat org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:160)\r\n\tat org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286)\r\n\tat org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)\r\n\r\nI removed logstash from dockerfile since I don't need it and added the following to docker file:\r\n`ENV PATH /usr/share/elasticsearch/bin:$PATH`\r\n\r\nReplaced the following (+ means added, - means line removed):\r\nDockerfile:\r\n```\r\n+ COPY elasticsearch.yml ./config/elasticsearch.yml\r\n- ADD ./elasticsearch.yml /etc/elasticsearch/elasticsearch.yml\r\n```\r\n\r\nstart.sh\r\n```\r\n+ CLUSTER_NAME=$(grep -Po '(?<=^cluster.name: ).*' /usr/share/elasticsearch/config/elasticsearch.yml | sed -e 's/^[ \\t]*//;s/[ \\t]*$//')\r\n- CLUSTER_NAME=$(grep -Po '(?<=^cluster.name: ).*' /etc/elasticsearch/elasticsearch.yml | sed -e 's/^[ \\t]*//;s/[ \\t]*$//')\r\n```\r\n\r\nSomehow, docker is running elasticsearch as root when adding the parameters (-Des parameters mentioned above), while if I don't specify any additional parameters, it seems to work just fine. Tried googling quite a bit, but in vain. \r\n\r\nI don't want to run as root, but I don't know how to run as another user. Are the scripts missing anything or am I missing something? "},"comment":{"url":"https://api.github.com/repos/spujadas/elk-docker/issues/comments/261370461","html_url":"https://github.com/spujadas/elk-docker/issues/87#issuecomment-261370461","issue_url":"https://api.github.com/repos/spujadas/elk-docker/issues/87","id":261370461,"user":{"login":"spujadas","id":930566,"avatar_url":"https://avatars.githubusercontent.com/u/930566?v=3","gravatar_id":"","url":"https://api.github.com/users/spujadas","html_url":"https://github.com/spujadas","followers_url":"https://api.github.com/users/spujadas/followers","following_url":"https://api.github.com/users/spujadas/following{/other_user}","gists_url":"https://api.github.com/users/spujadas/gists{/gist_id}","starred_url":"https://api.github.com/users/spujadas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spujadas/subscriptions","organizations_url":"https://api.github.com/users/spujadas/orgs","repos_url":"https://api.github.com/users/spujadas/repos","events_url":"https://api.github.com/users/spujadas/events{/privacy}","received_events_url":"https://api.github.com/users/spujadas/received_events","type":"User","site_admin":false},"created_at":"2016-11-17T21:10:36Z","updated_at":"2016-11-17T21:10:36Z","body":"OK thanks for the update, great to hear that you managed to figure out!\r\n(Closing the issue.)"}}
{"actor":{"display_login":"spujadas"}}