新建文件 test_build.sh
#!/bin/bash
mv test*.jar /root/xiaomao/test/test.jar
cd /root/xiaomao/test/
docker build -t 镜像仓库地址/xiaomao/test:v$1 .
docker push 镜像仓库地址/xiaomao/test:v$1
docker rmi 镜像仓库地址/xiaomao/test:v$1
rm -f /root/xiaomao/test/test.jar
新建文件 test_build.sh
#!/bin/bash
mv test*.jar /root/xiaomao/test/test.jar
cd /root/xiaomao/test/
docker build -t 镜像仓库地址/xiaomao/test:v$1 .
docker push 镜像仓库地址/xiaomao/test:v$1
docker rmi 镜像仓库地址/xiaomao/test:v$1
rm -f /root/xiaomao/test/test.jar