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
@Nino Gresenz hi. We updated an example you suggested in the pipe README.
Regards, Igor
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.