I'm trying to run elasticsearch in docker and my current directory is as follows :
es:.
│ createindices.sh
│ Dockerfile
│
└───analysis
wn_s.pl
my dockerfile is as follows which works perfectly, however, this version requires me to manually run the createindices.sh file in container
FROM elasticsearch:6.5.4
WORKDIR /app
ADD . /app
ADD analysis /usr/share/elasticsearch/config/analysis
COPY createindices.sh .
EXPOSE 9200
EXPOSE 9300
I updated my dockerfile as follows with an intention to run createindices.sh after the container is up and running
FROM elasticsearch:6.5.4
WORKDIR /app
ADD . /app
ADD analysis /usr/share/elasticsearch/config/analysis
COPY createindices.sh .
EXPOSE 9200
EXPOSE 9300
ENTRYPOINT ["/bin/bash"]
CMD ["./createindices.sh"]
the image builds successfully but i get following error when running a container with image made:
$ docker logs es
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to ::1: Cannot assign requested address
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to ::1: Cannot assign requested address
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to ::1: Cannot assign requested address
I've never received this error and i couldn't find much on stackoverflow.