bug fixed

develop
old易 2025-03-11 15:06:58 +08:00
parent 4c5458e7d4
commit c59c28618c
1 changed files with 8 additions and 3 deletions

View File

@ -1,7 +1,12 @@
# 使用 SDK 镜像作为构建基础
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime ENV TZ=Asia/Shanghai
RUN echo 'Asia/Shanghai' >/etc/timezone RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 设置工作目录
WORKDIR /app WORKDIR /app
COPY --from=build /app ./
# 暴露应用端口
EXPOSE 8081 EXPOSE 8081
COPY . .
# 设置容器启动命令
ENTRYPOINT ["dotnet", "New_College.Api.dll","-b","0.0.0.0"] ENTRYPOINT ["dotnet", "New_College.Api.dll","-b","0.0.0.0"]