简体   繁体   中英

How to install the Docker image into ECR using Jenkins

I can't find a right solution here. I got installed Jenkins on EC2 where I added a pipeline with link to the github where I have repository with docker-compose.yml file.

How to install this image of docker into ECR on AWS.

Documentation on pushing to ECR is available here

The steps are:

  1. Authenticate docker with ECR

  2. Build your docker image

  3. tag the docker image with the required ECR format:

     docker tag <image>:<version> <aws_account_id>.dkr.ecr.<region>.amazonaws.com/<image>:<version>
  4. docker push <aws_account_id>.dkr.ecr..amazonaws.com/

The simplest way to accomplish this is with a shell script. There are also jenkins plugins that will do this for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM