I've a working dockerfile to setup elasticsearch as follows :
FROM elasticsearch:6.5.4
WORKDIR /app
ADD . /app
ADD analysis /usr/share/elasticsearch/config/analysis
COPY test.sh .
EXPOSE 9200
EXPOSE 9300
my current file directory is as follows :
C:.
| Dockerfile
| test.sh
|
+---analysis
| wn_s.pl
|
\---poppler
+---bin
| AUTHORS
| BINARIES
| COPYING
| COPYING3
| freetype6.dll
| jpeg62.dll
I want to give the bin folder inside poppler as environment variable PATH for elasticsearch. To do this, i appended my dockerfile with
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
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 :
/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
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.
grep: command not foundgrep is also from an environment variable?