fail: Microsoft.Extensions.Hosting.Internal.Host[11] Hosting failed to start System.IO.IOException: Failed to bind to address http://[::]:8003: address already in use.
docker发布.net 8项目
# 使用 .NET 运行时镜像作为最终镜像 FROM mcr.microsoft.com/dotnet/runtime:8.0 # 设置工作目录 WORKDIR /app # 复制项目文件到工作目录 COPY . /app ENV ASPNETCORE_URLS="http://*:8003" ENV ASPNETCORE_HTTP_PORTS="" # 设置入口点 ENTRYPOINT ["dotnet", "Panda.Issue.Web.dll","--server.urls","http://*:8003"] # 暴露应用程序的发布端口 EXPOSE 8003
fail: Microsoft.Extensions.Hosting.Internal.Host[11]
Hosting failed to start
System.IO.IOException: Failed to bind to address http://[::]:8003: address already in use.
提示端口已占用