0

A service is running on docker at ipaddress 172.17.0.2:9042.

I want to connect it from my host machine, lets say from browser like http://172.17.0.2:9042

I am running my docker as follows.

docker run container_id

I am not able to connect it.

I don't want to do port forwarding, because there are lots of port forwarding I have to do, which I don't want.

Sumit Kumar
  • 480
  • 2
  • 15
  • You must use the `docker run -p` option to forward a port. There's no other reliable way to reach the container. (The container-private IP address only works from native Linux, and only from the same host; the other common hack, host networking, also only works on native Linux.) – David Maze Jul 10 '21 at 10:04

0 Answers0