1234567891011121314151617181920212223 |
- #!/usr/bin/env bash
- registry_host="ccr.ccs.tencentyun.com/aionnect"
- project_name="hello-java"
- cd ..
- ./gradlew build
- cp -r build/libs/*.jar deploy/app.jar
- for item in $(docker images | grep -E "$registry_host/$project_name\s+\S*" -o);
- do
- if [[ $item != "$registry_host/$project_name" ]];
- then
- echo "remove $registry_host/$project_name:$item"
- docker rmi "$registry_host/$project_name:$item"
- fi
- done
- tag=$(date +%s)
- docker build --no-cache --disable-content-trust=true -t $registry_host/$project_name:$tag ./deploy
- #docker push $registry_host/$project_name:$tag
|