Forums

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

Pipe "aws-ecr-push-image" using "ECR_PUBLIC=true" makes it mandatory to tag image differently

Nino Gresenz
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!
July 15, 2024 edited

Hello Bitbucket Team,

I was trying to push an image to AWS ECR public and used the aws-ecr-push-image pipe for it.

I had some trouble to get it running as I saw the following error:

DEBUG: http://host.docker.internal:2375 "GET /v1.44/images/registry-alias/my-docker-image:latest/json HTTP/1.1" 404 58
✖ Image not found error: registry-alias/my-docker-image:latest.

For me it wasn't clear what I did wrong as I was using the example from the docs:

"Building and pushing the ecr-public image with default options"

script:
  # build the image
  - docker build -t my-docker-image .

  # use the pipe to push the image to AWS ECR
  - pipe: atlassian/aws-ecr-push-image:2.4.0
    variables:
      AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
      AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
      IMAGE_NAME: my-docker-image
      ECR_PUBLIC: "true"
      PUBLIC_REGISTRY_ALIAS: registry-alias

 

Finally I've got it running after reading the source code of the pipe which makes it mandatory to tag the image as follows (PUBLIC_REGISTRY_ALIAS as prefix):

script: 
# build the image
- docker build -t registry-alias/my-docker-image .

 

Would be cool if you could change the example or leave a note somewhere in the README to avoid confusion for other people.

 

Cheers, Nino

2 answers

1 accepted

0 votes
Answer accepted
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 26, 2024

@Nino Gresenz hi. We updated an example you suggested in the pipe README.

Regards, Igor

1 vote
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 16, 2024

Hi @Nino Gresenz 

I believe the documentation example may be intentional because PUBLIC_REGISTRY_ALIAS is only mandatory if ECR_PUBLIC is set to true.

Regardless, I've shared this feedback with our pipes team - thank you for your input :)

Cheers!

- Ben (Bitbucket Cloud Support)

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events