下面是我的docker swarm设置详细信息。
服务:
使用Docker EE在Windows Server 2019上提供了传声路由网格。但是我无法访问Windows容器中托管的IIS。请帮忙。
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\Users\Administrator> docker --version
Docker version 17.06.2-ee-20, build cd8d740
PS C:\Users\Administrator> docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
kk6aamm6060p web replicated 3/3 microsoft/iis:latest *:8080->80/tcp
PS C:\Users\Administrator> docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1225f309538d microsoft/iis:latest "C:\\ServiceMonitor..." 13 hours ago Up 13 hours 80/tcp web.2.5gxsmycpuh1bsfetspop45i2q
PS C:\Users\Administrator> Invoke-WebRequest http://localhost:8080
Invoke-WebRequest : Unable to connect to the remote server
At line:1 char:1
+ Invoke-WebRequest http://localhost:8080
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
PS C:\Users\Administrator> ipconfig
Windows IP Configuration
Ethernet adapter vEthernet (Ethernet):
Connection-specific DNS Suffix . : ap-south-1.compute.internal
Link-local IPv6 Address . . . . . : fe80::404d:77be:125b:f602%4
IPv4 Address. . . . . . . . . . . : 172.31.30.7
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . : 172.31.16.1
Ethernet adapter vEthernet (nat):
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::ed03:9425:411:ec67%14
IPv4 Address. . . . . . . . . . . : 172.23.64.1
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . :
PS C:\Users\Administrator> Invoke-WebRequest http://172.23.64.1:8080
Invoke-WebRequest : Unable to connect to the remote server
At line:1 char:1
+ Invoke-WebRequest http://172.23.64.1:8080
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
PS C:\Users\Administrator> Invoke-WebRequest http://172.31.30.7:8080
Invoke-WebRequest : Unable to connect to the remote server
At line:1 char:1
+ Invoke-WebRequest http://172.31.30.7:8080
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
PS C:\Users\Administrator>