pipeline - dockerfile extends image FROM private repo

Hi,

 

My dockerfile extends an image hosted in a private repo in hub.docker.com:

 

FROM myprivaterepo/image:latest

When building, pipeline fails with:

+ docker build -t $IMAGE_NAME .
Sending build context to Docker daemon 37.27MBStep 1/11 : FROM myprivaterepo/image:latest
repository myprivaterepo/image not found: does not exist or no pull access

 

How could I extend my image with private images?

 

 

1 answer

1 accepted

0 votes

Duh... turns out I had `docker login` missplaced.

 

For anyone interested in the topic:

 

options:
docker: true

pipelines:
default:
- step:
script:
# Set $DOCKER_HUB_USERNAME and $DOCKER_HUB_PASSWORD as environment variables in repository settings
- export IMAGE_NAME=myprivaterepo/image:latest
- docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
- docker build -t $IMAGE_NAME .
- docker push $IMAGE_NAME

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

630 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot