Have created an dotnet core application and when run the command:
docker-compose up
everything goes well but I don't understand what does the below line mean:
Now listening on: http://[::]:80
Dockerfile content is:
FROM microsoft/aspnetcore:2.0
ARG source
WORKDIR /app
EXPOSE 80
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet", "SampleCoreApp.dll"]
docker-compose file is:
version: '3'
services:
samplecoreapp:
image: samplecoreapp
build:
context: ./SampleCoreApp
dockerfile: Dockerfile
Why is that I'm not seeing the IP address?
If i have a 3 VMs and if I want to run this application on VM2 then how can I deploy this docker container to VM2?
答案 0 :(得分:4)
Now listening on: http://[::]:80
表示:您的应用程序告诉您它正在侦听它拥有的所有IPv6地址上的TCP端口80。
详细说明:
[::]
是URL中IPv6地址0000:0000:0000:0000:0000:0000:0000:0000
的简写符号。请注意,::
不是有效的IPv6地址,但通常用作"所有IPv6地址的别名"。
同样,侦听其所有IPv4地址的TCP端口80的Web服务器通常会报告它正在监听http://0.0.0.0:80
。在您的情况下,它似乎期待IPv6流量。但是,许多应用程序都是双栈并且同时监听IPv4和IPv6。