Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "Now listening on: http://[::]:80" mean?

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?

like image 435
user3564183 Avatar asked Mar 08 '23 00:03

user3564183


1 Answers

Now listening on: http://[::]:80

means: your application is telling you that it is listening on TCP port 80 on all IPv6 addresses it owns.

[::] is the short-hand notation for the IPv6 address 0000:0000:0000:0000:0000:0000:0000:0000 within an URL. Note that :: is not a valid IPv6 address, but often is used as an alias for "all my IPv6 addresses".

Similarly, a web server that listens on TCP port 80 of all its IPv4 addresses usually reports that it is listening on http://0.0.0.0:80. In your case, it seems to be expecting IPv6 traffic instead. However, many applications are dual stack and listen to both, IPv4 and IPv6.

like image 132
Olli Avatar answered Mar 10 '23 17:03

Olli