on the IPv6 loopback interface: 'Cannot assign requested address'

.netcore +docker 

 

需要修改两个地方

Dockerfile

添加 ENV ASPNETCORE_URLS=http://+:44303  

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
ENV ASPNETCORE_URLS=http://+:44303
WORKDIR /app
EXPOSE 44303

 

appsettings.json

"urls": "http://localhost:44303"

改为

"urls": "http://0.0.0.0:4003"

posted @ 2022-09-27 10:46  ccqin  阅读(89)  评论(0编辑  收藏  举报