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.

提示端口已占用

posted @   韩梦芫  阅读(472)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
点击右上角即可分享
微信分享提示