title: adding environment variables to elasticsearch dockerfile
body: <p>I've a working dockerfile to setup elasticsearch as follows : </p>
  
  <pre><code>FROM elasticsearch:6.5.4
  WORKDIR /app
  ADD . /app
  ADD analysis /usr/share/elasticsearch/config/analysis
  COPY test.sh .
  EXPOSE 9200
  EXPOSE 9300
  </code></pre>
  
  <p>my current file directory is as follows : </p>
  
  <pre><code>C:.
  |   Dockerfile
  |   test.sh
  |
  +---analysis
  |       wn_s.pl
  |
  \---poppler
      +---bin
      |       AUTHORS
      |       BINARIES
      |       COPYING
      |       COPYING3
      |       freetype6.dll
      |       jpeg62.dll
  </code></pre>
  
  <p>I want to give the bin folder inside poppler as environment variable PATH for elasticsearch. To do this, i appended my dockerfile with </p>
  
  <pre><code>FROM elasticsearch:6.5.4
  WORKDIR /app
  ADD . /app
  ADD analysis /usr/share/elasticsearch/config/analysis
  COPY test.sh .
  EXPOSE 9200
  EXPOSE 9300
  ENV PATH=/app/es/poppler/bin
  </code></pre>
  
  <p>As a result, image is created but when a container is made using that image, its exits on start with following error in docker logs : </p>
  
  <pre><code>/usr/local/bin/docker-entrypoint.sh: line 62: env: command not found
  /usr/local/bin/docker-entrypoint.sh: line 93: id: command not found
  /usr/local/bin/docker-entrypoint.sh: line 8: id: command not found
  /usr/share/elasticsearch/bin/elasticsearch: line 17: dirname: command not found
  /usr/share/elasticsearch/bin/elasticsearch: line 17: /elasticsearch-env: No such file or directory
  /usr/share/elasticsearch/bin/elasticsearch: line 20: : command not found
  /usr/share/elasticsearch/bin/elasticsearch: line 25: grep: command not found
  /usr/share/elasticsearch/bin/elasticsearch: line 27: exec: : not found
  </code></pre>
  
  <p>I've had success with adding environment variables in the similar way in previous projects, however, despite searching over stackoverflow, i've not been able to figure out the point where it is going wrong.</p>