You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I have 3 containers that are built with docker-compose and I need to push these to ECR. This is my current pipeline. How can I get this to push to ECR? I have multiple repositories, one for each container that I need to push too.
image: python:3.7.2
options:
docker: true
pipelines:
default:
- step:
script:
- pipe: atlassian/aws-ecr-push-image:1.2.0
variables:
AWS_ACCESS_KEY_ID: 'xxxx'
AWS_SECRET_ACCESS_KEY: 'xxxx'
AWS_DEFAULT_REGION: 'xxxx'
IMAGE_NAME: ""
- step:
script:
- pip install docker
- pip install docker-compose
- docker-compose build
- docker push
Hi @ragnar.callan ,
You have to specify the ECR endpoint and make sure you are able to authenticate to the ECR.
Hi, thanks for the reply. I have created my ECR endpoints. I have 3. One for each containers with different names. In my docker-compose file I labelled the images with the names of these repos. I want to push all 3 images to their respective ECR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @ragnar.callan ,
Thank you for your question!
You could follow a Build Once Deploy Many approach and implement the next pipeline:
script:
# do other
- ...
- ...
# build the image
- docker-compose build
# use the pipe to push the image_1 to AWS ECR
- pipe: atlassian/aws-ecr-push-image:1.2.2
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: my-docker-image_1
# use the pipe to push the image_2 to AWS ECR
- pipe: atlassian/aws-ecr-push-image:1.2.2
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: my-docker-image_2
# use the pipe to push the image_3 to AWS ECR
- pipe: atlassian/aws-ecr-push-image:1.2.2
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: my-docker-image_3
Make sure that you provide right IMAGE_NAME for each push:
The name of the image to push to the ECR. The name should be the same as your ECR repository name. Remember that you don't need to add your registry URL in front of the image name, the pipe will fetch this URL from AWS and add it to the image tag for you.
Cheers,
Oleksandr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey there Cloud Community members! We’re excited to give you the first glimpse of the new home for business teams on Jira — Jira Work Management. Jira Work Management is the next generation of J...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.