i write dockerfile
EXPOSE 2181 2888 3888
and docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
abc644fe1ad0 00088267fb34 "/opt/startzookeeper…" 2 seconds ago Up 1 second 2181/tcp, 2888/tcp, 3888/tcp hopeful_curie
but when i telnet localhost 2181
Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused telnet: Unable to connect to remote host
why i cannot telnet the exposed port? should i add what to dockerfile? thanks your any suggestion