QWXFB-2024/正式赛/cxxdition_rxxe/deploy/deploy.sh
2024-09-16 11:35:04 +08:00

15 lines
495 B
Bash
Executable File

#!/bin/sh
if [ -z "$1" ]; then
echo "请提供一个参数"
exit 1
fi
echo "build in curuent directory."
docker build -t $1 .
echo "\033[34mLogin tencent docker hub.\033[0m"
# docker login ccr.ccs.tencentyun.com --username=100006009341
echo "\033[34mTag $1 to tencent.\033[0m"
docker tag `docker image ls | grep $1 | awk 'NR==1 {print $3}'` ccr.ccs.tencentyun.com/f61d/ctf:$1
echo `docker images | grep $1 `
echo "\033[34mPush $1.\033[0m"
docker push ccr.ccs.tencentyun.com/f61d/ctf:$1