Forums

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

How to deploy a private docker image to ECS using Bitbucket pipelines

Phil Cruz
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 18, 2019

I'm following this guide on how to deploy to ECS. I'm trying to pull from a private Docker Hub image so I'm following this article as well.

 

Bitbucket pipelines is running successfully. However, that tasks don't actually start running.

Looking at the task details I see " CannotPullContainerError: Error response from daemon: pull access denied for example/pipeline-poc, repository does not exist or may require 'docker login'"


image:
name: atlassian/pipelines-awscli:latest
username: $DOCKER_HUB_USERNAME
password: $DOCKER_HUB_PASSWORD
email: "example@example.com"

What could be the issue?

1 answer

0 votes
Steven Vaccarella
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 25, 2019

Hi Phil,

The username and password in the "image" section are only used for pulling the main build container that your build script runs in. Those values are not automatically available when you run docker commands within your build script.

In this case there's no need to include them at all in the image section because you're using a public docker image to run your step.

Instead, you should run a "docker login" command within your build script before running any other docker commands.

If that doesn't help, please post more of your yaml file, including the build script (with any sensitive information blanked out) and indicate exactly which command is failing.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events