refactor: .NET 镜像改为 build.sh 预下载 SDK/运行时,精简依赖并补充忽略文件

- compile/runtime dotnet6/8/9:ADD 本地 tar.gz 替代 ADD 远程 URL,压缩包由
  build.sh 先下载(带缓存判断),避免构建时重复下载与层缓存失效
- 精简 yum 依赖:compile 镜像保留 gcc/make,runtime 镜像去掉编译工具链;
  统一补装 libicu(.NET 全球化必需,缺失时 dotnet 命令直接 Abort)
- 每个镜像目录新增 .dockerignore(不忽略 *.tar.gz,因需在构建上下文内)与 .gitignore
- build.sh 加 shebang、set -euo pipefail,并 cd 到脚本所在目录,加可执行权限
- system-alinux3:设置时区软链,aliyun 镜像源域名修正为 mirrors.aliyun.com
This commit is contained in:
2025-11-22 21:03:22 +08:00
parent 1dc1a2c07c
commit c9ead5f038
25 changed files with 157 additions and 106 deletions
+3 -1
View File
@@ -5,4 +5,6 @@ ENV TimeZone=Asia/Shanghai
WORKDIR /home/admin
# 升级会有很多问题,比如nginx编译失败等
#RUN yum update -y && yum clean all;
#RUN yum update -y && yum clean all;
RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone; \
sed -i 's/mirrors.cloud.aliyuncs.com/mirrors.aliyun.com/' /etc/yum.repos.d/*.repo;