修改docker file

This commit is contained in:
Dai Mr 2025-05-20 17:10:33 +08:00
parent 6ff97c1c0f
commit 3d83cf0ccb

View File

@ -1,7 +1,7 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
EXPOSE 8080
EXPOSE 10500
ENV TZ=Asia/Shanghai
ENV ASPNETCORE_ENVIRONMENT=Production
@ -38,15 +38,7 @@ RUN mkdir -p /app/Plugins
# 复制发布内容
COPY --from=publish /app/publish .
# 健康检查
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
CMD curl -f http://localhost:80/health || exit 1
# 设置入口点
ENTRYPOINT ["dotnet", "JiShe.CollectBus.Host.dll"]
# 启动命令
# 可选:添加命令行参数
# CMD ["--urls", "http://+:80"]