更新客户端镜像build脚本

This commit is contained in:
aoshiguchen
2023-07-26 10:11:36 +08:00
parent a400fccf77
commit 4550a677db
+15 -1
View File
@@ -5,6 +5,19 @@ ImageVer=1.8.5
ImageName=neutrino-proxy-client
DockerFilePath=$PWD/../../neutrino-proxy-client/Dockerfile
deployDir=$PWD/../../"deploy"
clientDeployDir=$deployDir"/client"
#切到项目根目录
#初始化文件夹
if [ ! -d "$deployDir" ];then
mkdir $deployDir
fi
if [ ! -d "$clientDeployDir" ];then
mkdir $clientDeployDir
fi
rm -rf $clientDeployDir/$ImageName.tar
#echo '打包jar...'
sh ./client_build.sh
@@ -12,4 +25,5 @@ sh ./client_build.sh
docker rmi -f $(docker images | grep $ImageName | awk '{print $3}')
# 构建镜像
docker build -t $ImageName:$ImageVer -t $ImageName:latest -f $DockerFilePath $PWD/../..
# 保存镜像到本地
docker save -o $clientDeployDir/$ImageName.tar $ImageName:$ImageVer