How can i access the website running inside a Docker container using IP address of container

后端 未结 1 681
面向向阳花
面向向阳花 2021-02-06 14:11

How can i access the website running inside container at ip 172.20.128.2 .I do not want to do port forwarding and using host ip. I am aware that i can forward docker port on ho

1条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-06 14:56

    This blog post explains many ways to reach your container from outside. Have a look Four ways to connect a docker container.

    Be sure your web server is well configured testing at least once with -p option.

    Also you can test with the --network host option

    Regards

    0 讨论(0)
提交回复
热议问题