diff --git a/docker/services/elasticsearch/Dockerfile b/docker/services/elasticsearch/Dockerfile index 937076543..93d68bff9 100644 --- a/docker/services/elasticsearch/Dockerfile +++ b/docker/services/elasticsearch/Dockerfile @@ -14,6 +14,6 @@ LABEL version=$VERSION USER root -RUN chown elasticsearch:elasticsearch config/elasticsearch.yml +ADD run_elasticsearch.sh /run_elasticsearch.sh +CMD /run_elasticsearch.sh -USER elasticsearch diff --git a/docker/services/elasticsearch/run_elasticsearch.sh b/docker/services/elasticsearch/run_elasticsearch.sh new file mode 100755 index 000000000..8e12178cd --- /dev/null +++ b/docker/services/elasticsearch/run_elasticsearch.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +chown -R elasticsearch:elasticsearch /usr/share/elasticsearch* +su elasticsearch -s /bin/sh -c "/usr/share/elasticsearch/bin/elasticsearch" +