YiZhanManage/build-version.sh

72 lines
1.4 KiB
Bash
Raw Normal View History

2025-01-22 15:28:57 +08:00
version=1.1
images=("jysoft-system" "jysoft-gateway" "jysoft-log" "jysoft-dining" "jysoft-information" "jysoft-interact" "jysoft-isc" "jysoft-life" "jysoft-official" "jysoft-physical" "jysoft-property" "jysoft-visitor")
for image in "${images[@]}"
do
# 获取当前镜像的 ID
id=$(docker images -q "$image")
if [ ! -z $id ]; then
echo "正在为镜像 '$image' 添加标记..."
# 设置新的标记名称(可根据需求修改)
tag=$version
docker tag "$image:latest" "$image:$tag"
echo "已成功将镜像 '$image' 标记为 '$tag'"
else
echo "未找到镜像 '$image'"
fi
done
echo "所有镜像修改完毕,开始打包新的镜像======="
cd jysoft-gateway/
docker build -t jysoft-gateway .
cd ..
cd jysoft-system/
docker build -t jysoft-system .
cd ..
cd jysoft-log/
docker build -t jysoft-log .
cd ..
cd jysoft-dining/
docker build -t jysoft-dining .
cd ..
cd jysoft-information/
docker build -t jysoft-information .
cd ..
cd jysoft-interact/
docker build -t jysoft-interact .
cd ..
cd jysoft-isc/
docker build -t jysoft-isc .
cd ..
cd jysoft-life/
docker build -t jysoft-life .
cd ..
cd jysoft-official/
docker build -t jysoft-official .
cd ..
cd jysoft-physical/
docker build -t jysoft-physical .
cd ..
cd jysoft-property/
docker build -t jysoft-property .
cd ..
cd jysoft-visitor/
docker build -t jysoft-visitor .