Files
kenaito-lab/image/proxy-tengine3/build.sh
T
odboy 6430246299 refactor: tengine/python 镜像改为 build.sh 预下载源码包,移除远程 ADD
- proxy-tengine3、runtime-python3、tools-ansible:ADD 改成本地文件名,
  源码包由 build.sh 先下载(已存在则复用),避免每次构建都拉外网且不受层缓存保护
- build.sh 加 shebang、set -euo pipefail,并 cd 到脚本所在目录,加可执行权限
- 三个目录新增 .dockerignore(不忽略源码包,ADD 源文件需在构建上下文内)与 .gitignore
- runtime-jdk11/17/21 的 build.sh 已是预下载+解包流程,本次不动
2025-11-29 21:34:59 +08:00

16 lines
424 B
Bash
Executable File

#!/usr/bin/env bash
# 先下载 tengine 源码包到当前目录,再基于本地文件构建镜像
set -euo pipefail
cd "$(dirname "$0")"
TENGINE=tengine-3.1.0.tar.gz
URL=https://tengine.taobao.org/download/tengine-3.1.0.tar.gz
if [ ! -f "${TENGINE}" ]; then
curl -fL -o "${TENGINE}" "${URL}"
fi
IMAGE=registry.cn-shanghai.aliyuncs.com/odboy/kenaito:proxy-tengine3
docker build -t "${IMAGE}" .
docker push "${IMAGE}"