The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

how to push Buildx docker image into AWS ECR.

Madhaiyan Muthu
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!
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Norbert Csupka
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

TAGS
AUG Leaders

Atlassian Community Events