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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Is it possible to cache dockers images built in the step within bitbucket-pipelines docker cache

Edited

Hello,

I'm using this step (attached above) in one of my pipelines. As you can see we are running the container tests using docker-compose. When using up command the docker-compose will try to check if any image exists locally to run the container, if it doesn't docker-compose will build it first.

I was wondering whether it is possible to push the image build artifact into the bitbucket-pipeline's docker cache so it could be utilized later on different pipeline-executions?

- step:
name: Run Tests
image: docker/compose
services:
- docker
caches:
- docker
script:
- docker-compose -f docker-compose.test.yml up --exit-code-from name
after-script:
# after script because we upload the logs regardless to result of the script (success / failed)
# Get docker containers logs
- mkdir container-logs
- docker-compose -f docker-compose.test.yml logs --no-color > container-logs/logs.log
artifacts:
- container-logs/logs.log

 

According to the docker service, it seems that it doesn't find the image and therefore it builds it again.

 

time="2020-07-19T17:27:14Z" level=info msg="Pipelines plugin request authorization." allowed=true method=GET plugin=pipelines uri=/v1.30/images/name/json

time="2020-07-19T17:27:14.177152885Z" level=error msg="Handler for GET /v1.30/images/name/json returned error: no such image: name: No such image: name:latest"

 

Does anyone understand what is the issue?

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,749 views 10 16
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you