I have working with dockerfile to build and image and it build and run successfully but tomcat is not up

若如初见. 提交于 2019-12-08 10:03:30
VonC

Since you are in a boot2docker environment, that means the port 8080 is mapped to 8080 in the boot2docker VM (the Linux host). Not in your PC (Windows actual host).

You need to open the port as well in your Virtualbox in order for said port to be visible from your windows host, and for your browser to access localhost:8080.

See Boot2Docker: can't get ports forwarding to work for more:
(make sure c:\path\to\VirtualBox is in your PATH)

you can set up a permanent VirtualBox NAT Port forwarding:

VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port8080,tcp,,8080,,8080";

If the vm is already running, you should run this other command:

VBoxManage controlvm "boot2docker-vm" natpf1 "tcp-port8080,tcp,,8080,,8080";
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!