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