Forums

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

Docker cache untagging images between pipelines

tom.noble
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!
April 18, 2020

I'm currently trying to use docker and docker-compose to run some tests in parallel via a bitbucket pipeline. Since the services running the tests are all based off the same image, I'm attempting to build it once in a separate pipeline, cache the results, then use the image when calling docker-compose up in the other pipeline -- saving some time when actually running the tests.

The the image below shows the docker image being built and cached as expected in the first pipeline

Screenshot 2020-04-19 at 03.36.30.png

However, when attempting to use the image in the second, I get the following error. Listing the images present on that pipeline shows that, although the correct image seems to be getting cached and fetched (same image ID), the tag is now missing.

Screenshot 2020-04-19 at 03.37.41.png

I'm unsure if this is an issue on bitbucket's end, or whether I'm using this functionality incorrectly... Any help would be appreciated!

1 answer

0 votes
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 19, 2020

Hello @tom.noble ,

Welcome to the Community!

The cache is not meant to be used for consuming images like this. All caches (not just Docker) are in place to speed up build process, when possible. Note that they are not updated on every build, and your build should be prepared for caches to be absent at any time.

What you need to do is to push your docker image to some Docker registry (like Docker Hub, AWS or self-hosted) and then pull it from there.

Hope this helps. Let me know if you have any questions.

Cheers,
Daniil

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events