ECS集群管理docker

1. create ECR Repositories on AWS
  a. local server need install git/docker/awscli
  b. config aws: use command --- aws configure
  c. $(aws ecr get-login --no-include-email --region eu-west-1)
    it will create $PATH/.docker/config.json file, this is token to login aws repository
  d. build image on local --- docker build -t maple .
  e. tag your image so you can push the image to this repository:
    docker tag maple:latest 765209488829.dkr.ecr.eu-west-1.amazonaws.com/maple:latest
  f. push image to aws repository
  docker push 765209488829.dkr.ecr.eu-west-1.amazonaws.com/maple:latest

2. crete task to run docker


3. create ECS as the task

 

note:

  we can modify autoscaling to set instance number

posted @ 2019-04-28 17:26  阿拉米苏  阅读(245)  评论(0编辑  收藏  举报