修改docker file
This commit is contained in:
parent
6ff97c1c0f
commit
3d83cf0ccb
12
Dockerfile
12
Dockerfile
@ -1,7 +1,7 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
EXPOSE 80
|
EXPOSE 8080
|
||||||
EXPOSE 443
|
EXPOSE 10500
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
ENV ASPNETCORE_ENVIRONMENT=Production
|
ENV ASPNETCORE_ENVIRONMENT=Production
|
||||||
|
|
||||||
@ -38,15 +38,7 @@ RUN mkdir -p /app/Plugins
|
|||||||
# 复制发布内容
|
# 复制发布内容
|
||||||
COPY --from=publish /app/publish .
|
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"]
|
ENTRYPOINT ["dotnet", "JiShe.CollectBus.Host.dll"]
|
||||||
|
|
||||||
# 启动命令
|
|
||||||
# 可选:添加命令行参数
|
|
||||||
# CMD ["--urls", "http://+:80"]
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user