为了更好的为您提供服务, 云效 邀请您使用持续交付相关功能。云效结合ECS、EDAS等服务为您提供完备的发布、部署、测试全研发流程,大大提升您的研发效率. 了解更多>
build.sh 1.39 KB
# login
cd $(dirname $0)/dockerfile
if [ -z "$1" ];then
    echo "building with demo.."
    repo_url="https://code.aliyun.com/middlewarerace2019/adaptive-loadbalance.git"
else
    repo_url=$1
fi

set -ex
cat ../.passwd | sudo -S -p '' docker login --username=middlewarerace2019 registry.cn-shanghai.aliyuncs.com \
    -p $(cat ../.dockerpwd_file)
# build debian-jdk8
cd  debian-jdk8
sudo docker build -t registry.cn-shanghai.aliyuncs.com/aliware2019/debian-jdk8 .
sudo docker push registry.cn-shanghai.aliyuncs.com/aliware2019/debian-jdk8
cd ..

# build debian-jdk8-devel
cd debian-jdk8-devel
cat ../.passwd | sudo -S -p sudo docker build -t registry.cn-shanghai.aliyuncs.com/aliware2019/debian-jdk8-devel .
sudo docker push registry.cn-shanghai.aliyuncs.com/aliware2019/debian-jdk8-devel
cd ..

# build provider
cd debian-jdk8-adaptive-loadbalance/debian-jdk8-provider
cat ../../../.passwd | sudo -S -p '' docker build --build-arg user_code_address=${repo_url} -t registry.cn-shanghai.aliyuncs.com/aliware2019/provider .
sudo docker push registry.cn-shanghai.aliyuncs.com/aliware2019/provider
cd ../..

# build consumer
cd debian-jdk8-adaptive-loadbalance/debian-jdk8-consumer
cat ../../../.passwd | sudo -S -p '' docker build --build-arg user_code_address=${repo_url} -t registry.cn-shanghai.aliyuncs.com/aliware2019/consumer .
sudo docker push registry.cn-shanghai.aliyuncs.com/aliware2019/consumer
cd ../..

echo 'DONE!'