Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

how to push Buildx docker image into AWS ECR.

Madhaiyan Muthu June 16, 2022

Hi,

I am trying to push multi-arch docker images into ECR using  docker buildx command. Not able to Push. I am getting the following error. but I am able to push docker build images. any suggestion (or) solution?

ERROR:

INFO: Successfully logged in to https://xxxxxxxx.dkr.ecr.us-east-1.amazonaws.com


✖ Image not found: 404 Client Error for http://host.docker.internal:2375/v1.41/images/imag1:v1/json: Not Found ("no such image: imag1:v1: No such image: imag1:v1")

 

pipelines:

branches:

default:

- step:

name: Build and publish the docker image

image: docker-repo/dock-buildx:v1

runs-on:

- linux

- self.hosted

services:

- docker

script:

- export IMAGE_NAME="ecr_repo:${BITBUCKET_BUILD_NUMBER}"

# - docker build -t "$IMAGE_NAME" . // able to push this

- docker buildx version

- docker buildx create --use

- docker buildx build -t "${IMAGE_NAME}" --platform linux/amd64,linux/arm64 .

- pipe: atlassian/aws-ecr-push-image:1.5.0

variables:

AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID

AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY

AWS_DEFAULT_REGION : $AWS_DEFAULT_REGION

IMAGE_NAME: $IMAGE_NAME

TAGS: $BITBUCKET_BUILD_NUMBER

definitions:

services:

docker:

image: docker:dind

memory: 2048

1 answer

0 votes
Norbert C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 20, 2022

Hi Madhaiyan,

Thanks for reaching out to Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you!

Based on my observation the build fails as it doesn't find the "imag1:v1" image

✖ Image not found: 404 Client Error for http://host.docker.internal:2375/v1.41/images/imag1:v1/json: Not Found ("no such image: imag1:v1: No such image: imag1:v1")

 To verify if the imag1:v1 exists or not, before you push the Docker image, can you run a "docker image ls" command and give us the output?

Thank you.

Best Regards,
Norbert
Atlassian Bitbucket Cloud Support

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events