This commit is contained in:
2025-11-01 21:18:29 +08:00
parent 35478d43d6
commit a607719b46
119 changed files with 815 additions and 1221 deletions

View File

@@ -10,6 +10,7 @@ export LANG=en_US.UTF-8
[ 'x86_64' == "$(uname -m)" ] && ARCH='' || ARCH="-$(uname -m)"
ROOT_DIR="$(cd $(dirname $0) && pwd)"
IMAGE="harbor.colben.cn/general/$(basename ${0%.sh})$ARCH:latest"
ALI=
if [ -t 0 ]; then
function Print { echo -e "\033[36;1m$(date +'[%F %T]')\033[32;1m $*\033[0m"; }
@@ -41,7 +42,7 @@ function YesOrNo {
}
function Update {
:
[ -z "$ARCH" ] && ALI=aliyun-cli-linux-latest-amd64.tgz || ALI=aliyun-cli-linux-latest-arm64.tgz
}
function Build {
@@ -51,7 +52,7 @@ function Build {
&& Warn Removing image $IMAGE ... \
&& docker rmi $IMAGE
Warn Building image: $IMAGE ...
docker build --force-rm --build-arg ARCH="$ARCH" -t $IMAGE .
docker build --force-rm --build-arg ARCH="$ARCH" --build-arg ALI="$ALI" -t $IMAGE .
YesOrNo Push image: $IMAGE? && docker push $IMAGE
}