Error failed to fetch an image or build from source: error connecting to docker: failed building options: Validation failed: Name has already been taken

On CI, for an app that I’ve built several times, retrying the build seems to fix the error. What can I do to prevent this?

As far as I know this is an ongoing issue that nobody has yet pinned down the cause of.

It seems like it may be connected to using a remote builder so if your CI service has Docker available, you could use that instead to see if that resolves it. Else a slightly awkward fix is deleting the remote builder. But that’s less than ideal e.g