FROM docker.jisheyun.com/jisheyun/aspnetcore:8.0.10_basic_ub24 AS base # 这里确定使用的端口 EXPOSE 8080 EXPOSE 443 COPY publish /app WORKDIR /app ARG BUD_ENV=Development # 这里确定生产环境还是DEV环境等 ENV RUN_ENV=$BUD_ENV # 根据 RUN_ENV 的值删除特定的配置文件 # 只在构建过程中执行的指令 RUN if [ "$RUN_ENV" = "Development" ]; then \ rm -f ./appsettings.Production.json; \ fi RUN if [ "$RUN_ENV" = "Production" ]; then \ rm -f ./appsettings.Development.json; \ fi ENTRYPOINT ["dotnet", "JiShe.MicroService.HttpApi.Host.dll"] ##See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. # #FROM mcr.microsoft.com/dotnet/aspnet:8.0.10-noble AS base # #WORKDIR /app # ##USER root # ## apt-get源 使用aliyun的源 #COPY ["sources.list", "/etc/apt/"] # ## 转换时区 #RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ #&& echo 'Asia/Shanghai' >/etc/timezone \ ## 更新系统并安装网络调试工具 #&& apt-get update \ #&& apt-get install -y \ #vim \ #net-tools \ #iputils-ping