Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to pull a private ECR image using OIDC?

David Bronke
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 2, 2023

The atlassian/aws-ecr-push-image:2.0.0 image allows us to push to a private ECR repository using OIDC for authentication, but we'd also like to be able to pull a base image from the same repository. Is there a way for us to do that?

1 answer

1 vote
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 3, 2023

@David Bronke  hi. Thanks for your question.
Try Use AWS ECR images in Pipelines with OpenID Connect guide, maybe it is your case.

Regards, Igor

David Bronke
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 10, 2023

No, that's not our use case; that's just for using an image from an ECR repo to run a given step. Instead, we need to pull an image from an ECR repo inside a step, and use it as the base image for a new docker build.

Like Martin Higham likes this
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 10, 2023

@David Bronke  You could try the next approach:

  • install aws-cli in the step
  • aws authenticate docker to an Amazon ECR
  • docker pull the image from ecr

Additional links: Pulling an image , Private registry authentication 

To install aws-cli:

script:
- curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.2.9.zip" -o "awscliv2.zip" && unzip awscliv2.zip
- echo 'c778f4cc55877833679fdd4ae9c94c07d0ac3794d0193da3f18cb14713af615f awscliv2.zip' | sha256sum -c - && ./aws/install

 Regards, Igor 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events