Build fails with error - Cannot overwrite digest

We have spent some time today moving our CI to do local building, however facing some issues with emulated builds where the context and dockerfile for a service are in different folders.