This commit is contained in:
parent
d65a0e7999
commit
fd7a5020d5
|
|
@ -1,23 +0,0 @@
|
|||
#!/bin/bash
|
||||
# This script builds the Docker image
|
||||
# 读取第一个参数
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "错误:调用该脚本时必须传入 2 个参数。"
|
||||
exit 1
|
||||
fi
|
||||
echo "服务名: $1 Java包: $2"
|
||||
rm tuoheng.jar
|
||||
cp $2 tuoheng.jar
|
||||
source ../environment.sh
|
||||
export APP_NAME=$1
|
||||
#docker service rm $APP_NAME
|
||||
sleep 5
|
||||
docker container prune -f
|
||||
sleep 5
|
||||
cp /data/java/apache-skywalking-java-agent-9.0.0.tgz apache-skywalking-java-agent-9.0.0.tgz
|
||||
docker image rm $REGISTRY/tuoheng/$APP_NAME:$DOMAIN
|
||||
docker build --no-cache \
|
||||
--build-arg SW_APP_NAME=$APP_NAME \
|
||||
--build-arg SW_SKY_AOP=$SKY_AOP \
|
||||
-t $REGISTRY/tuoheng/$APP_NAME:$DOMAIN . # 注意末尾的 `.` 表示当前路径
|
||||
docker push $REGISTRY/tuoheng/$APP_NAME:$DOMAIN
|
||||
Loading…
Reference in New Issue