I'm trying to start elasticsearch 2.4.6 on my Mac (HighSierra).
Using: Docker Kitematic 0.17.2, Docker for Mac 18.06.1
After I download and run selected image in container I have
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
dc5e1f90ce24 elasticsearch:2.4.6 "/docker-entrypoint.…" 13 hours ago Up 3 minutes 0.0.0.0:32782->9200/tcp, 0.0.0.0:32781->9300/tcp elasticsearch
But Elastic cannot be reached out on 9200, 9300
curl 'http://localhost:9200/?pretty'
curl: (7) Failed to connect to localhost port 9200: Connection refused
curl 'http://0.0.0.0:9200/?pretty'
curl: (7) Failed to connect to 0.0.0.0 port 9200: Connection refused
Isn't 0.0.0.0 should be available?
The answer was pretty clear, thanks Val. But to make it easier I changed in Kitematic mapping ports to 9200, 9300, so now I have
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a817c85926dc elasticsearch:2.4.6 "/docker-entrypoint.…" 4 minutes ago Up 4 minutes 0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp elasticsearch
As I expected