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

Pipeline won't refresh docker image to latest

Stephen Moon September 11, 2023
I recently updated a docker image used by an existing pipeline.  But the pipeline continues to use a older (cached?) image.

Old image sha: af561898ba
New image sha: 4d1f87d6c1

I've tried deleting the cache (not positive I did this correctly, we don't have any caching defined) and manually pulling the latest image in the pipeline yaml:

- docker pull company/project:latest

Which succeeds:

Digest: sha256:4d1f87d6c1f8cec1e816558d176c2202feb3cb3c7a2f79321462e8b1b7f8275e
Status: Downloaded newer image for $DOCKERHUB_USERNAME/project:latest$DOCKERHUB_USERNAME/project:latest
But the later steps of the yaml still continue to use the older image:
From the 'Build Setup':

The new image is available and 100% working, I was able to manually pull it and test it locally outside of the pipe.  I also deleted all previous images on docker, so this must be a cached version via bitbucket some how.

I think I need help a) clearing the docker image cache on bitbucket, or b) forcing pipe to use a specific docker image.  I've already tried:

name: company/project:latest

for b) but it has no affect.

2 answers

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 13, 2023

Hi Stephen,

I would suggest creating a ticket with the support team about this issue. If we have an open support ticket, the engineer working on it will be able to access additional logs and investigate.

You can create a ticket via, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. Please make sure to provide the build URL in the ticket description, so we can check the build logs and additional logs.

Kind regards,

0 votes
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 12, 2023

I  remember we ran into this a few years ago. Our solution is that we update the Docker image only from the Pipeline with a custom build, which somehow flushes the previously cached Docker image.

It roughly looks like this (with parts removed):

... removed tags: 'docker-wdio-*': - step: image: atlassian/default-image:3 name: Update Pipeline Docker image caches: - docker services: - docker script: - cd test/synthetic - docker build -t midoriglobal/carchc-wdio:latest . - docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD - docker push midoriglobal/carchc-wdio:latest custom: wdio-tests: - step: image: midoriglobal/carchc-wdio:latest name: Browser tests caches: - node script:
.... removed

As you see, you have to run the build "docker-wdio-*" to update the image, which will be used in all future "wdio-tests" builds.

I hope this helps.

Stephen Moon September 13, 2023

Appreciate the information, but unfortunately I wasn't able to get this to work either.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events