3 changed files with 5 additions and 32 deletions
@ -1,7 +0,0 @@ |
|||||
aws configure set aws_access_key_id AKIAVRXFMB43TOELSROK |
|
||||
aws configure set aws_secret_access_key GYxb5qzuYeEuXLj9/kW9FJB05c2oAu7Cw7j82pLS |
|
||||
aws configure set default.region ap-northeast-1 |
|
||||
aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin 381659385655.dkr.ecr.ap-northeast-1.amazonaws.com |
|
||||
|
|
||||
docker build -t 381659385655.dkr.ecr.ap-northeast-1.amazonaws.com/tokyo-build-business:latest --build-arg JAR_FILE=target/data-center-business-controller-0.0.1-SNAPSHOT.jar --build-arg LIB_DIR=target/lib --build-arg CONFIG_DIR=target/config . |
|
||||
docker push 381659385655.dkr.ecr.ap-northeast-1.amazonaws.com/tokyo-build-business:latest |
|
||||
@ -1,18 +0,0 @@ |
|||||
# 设置 AWS 凭证 |
|
||||
aws configure set aws_access_key_id AKIA5OFH5OOZPCXZIRUQ |
|
||||
aws configure set aws_secret_access_key TMIN27+OxamT1FmBQSVKfUIWpOVldhxQx2Stxwix |
|
||||
aws configure set default.region ap-northeast-1 |
|
||||
|
|
||||
# 获取 ECR 登录密码并登录 Docker |
|
||||
$loginPass = aws ecr get-login-password --region ap-northeast-1 |
|
||||
$loginPass | docker login --username AWS --password-stdin 923770123186.dkr.ecr.ap-northeast-1.amazonaws.com |
|
||||
|
|
||||
# 构建 Docker 镜像 |
|
||||
docker build -t 923770123186.dkr.ecr.ap-northeast-1.amazonaws.com/tokyo-build-business:latest ` |
|
||||
--build-arg JAR_FILE=target/data-center-business-controller-0.0.1-SNAPSHOT.jar ` |
|
||||
--build-arg LIB_DIR=target/lib ` |
|
||||
--build-arg CONFIG_DIR=target/config ` |
|
||||
. |
|
||||
|
|
||||
# 推送镜像 |
|
||||
docker push 923770123186.dkr.ecr.ap-northeast-1.amazonaws.com/tokyo-build-business:latest |
|
||||
Loading…
Reference in new issue