简体   繁体   English

如何从主机上的虚拟机访问 docker 应用程序?

[英]How to access docker app from virtual machine on host?

I installed docker on virtual machine and started container there.我在虚拟机上安装了 docker 并在那里启动了容器。 My container is now running and I want to see the app on my host machine.我的容器现在正在运行,我想在我的主机上查看该应用程序。

docker container ls command returns docker container ls 命令返回

PORTS: 0.0.0.0:8080->8080/tcp端口:0.0.0.0:8080->8080/tcp

but I'm not sure how to work with this, and how to access the app on my host browser.但我不确定如何使用它,以及如何在我的主机浏览器上访问该应用程序。

first you most sure that you could access to vm whit ping or telnet to your VMs IP.首先,您最确定您可以通过 ping 或 telnet 访问虚拟机 IP。

if you don't have access read this link如果您无权阅读此链接

if you have access your URL will be ---> http://yourVMip:8080如果您可以访问您的 URL 将是 ---> http://yourVMip:8080

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM