Pushing to private repository from bitbucket pipelines will always push even if the image is already in the repository

I posted this question to bitbucket, but I may as well post it here to. Do you know why pushing to our private repository would behave in this way?

It happens every time the images have been built. The images are present in our private repository, and when I push from my own machine it will not push, saying “Layer already exists”, which is what I want.

According to Atlassian: “This is due to the way docker caching was implemented.” (in Bitbucket Cloud).

We have been waiting for a long time for Atlassian to fix this: https://jira.atlassian.com/browse/BCLOUD-15850

I’m surprised that there don’t seem to be more people running into this issue.