问题描述
我使用以下命令启动容器
I used following command to start the container
docker run -d -p 50080:80 - name iis iis_new ping -t localhost
docker run -d -p 50080:80 --name iis iis_new ping -t localhost
容器已开始运行但我无法访问iis服务器。我无法看到端口50080正在收听。
the container has started running but i'm unable to access iis server. I'm unable to see the port 50080 listening.
推荐答案
您将看不到TCP:50080正在侦听容器主机本身。但是,应该通过运行PS C验证静态映射规则:\> Get-NetNatStaticMapping
You will not see TCP:50080 listening on the container host itself. However, there should be static mapping rules verified by running PS C:\> Get-NetNatStaticMapping
您确定IIS Web服务器正在运行并在容器内部进行侦听。请在容器本身中运行netstat -aonp tcp。
Are you sure the IIS web server is running and listening inside the container itself. Please run netstat -aonp tcp in the container itself.
这篇关于港口不听的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!