dvilasuero HF Staff commited on
Commit
7c245b4
·
1 Parent(s): 8011440

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -3
Dockerfile CHANGED
@@ -6,6 +6,7 @@ EXPOSE 9200
6
  RUN apt update
7
  RUN apt -y install python3.9-dev gcc gnupg apache2-utils systemctl curl sudo vim
8
 
 
9
  # Create new user for starting elasticsearch
10
  #RUN useradd -ms /bin/bash user -p "$(openssl passwd -1 ubuntu)"
11
  #RUN echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
@@ -23,7 +24,7 @@ RUN sed -i '$ a\cluster.routing.allocation.disk.threshold_enabled: false' /etc/e
23
 
24
  # Create elasticsearch directory and change ownership
25
  RUN mkdir -p /var/run/elasticsearch
26
- RUN chown -R elasticsearch:elasticsearch /var/run/elasticsearch
27
 
28
  # Install Elasticsearch
29
  RUN apt-get update && \
@@ -33,6 +34,5 @@ RUN apt-get update && \
33
  RUN echo "Starting Elasticsearch"
34
  RUN systemctl daemon-reload
35
  RUN systemctl enable elasticsearch
36
- RUN systemctl start elasticsearch
37
 
38
- CMD ["systemctl", "start", "elasticsearch"]
 
6
  RUN apt update
7
  RUN apt -y install python3.9-dev gcc gnupg apache2-utils systemctl curl sudo vim
8
 
9
+
10
  # Create new user for starting elasticsearch
11
  #RUN useradd -ms /bin/bash user -p "$(openssl passwd -1 ubuntu)"
12
  #RUN echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
 
24
 
25
  # Create elasticsearch directory and change ownership
26
  RUN mkdir -p /var/run/elasticsearch
27
+ RUN chown -R 1000:1000 /var/run/elasticsearch
28
 
29
  # Install Elasticsearch
30
  RUN apt-get update && \
 
34
  RUN echo "Starting Elasticsearch"
35
  RUN systemctl daemon-reload
36
  RUN systemctl enable elasticsearch
 
37
 
38
+ CMD ["elasticsearch"]