I’m having an issue trying to do a docker buildx build and push to an ECR private repository. I created by buildx builder with:
docker buildx create --name mybuilder --driver docker-container --driver-opt image=moby/buildkit:v0.9.3 --platform linux/arm64,linux/amd64 --use
For my docker build I do:
docker buildx build --platform linux/arm64,linux/amd64 --no-cache --build-arg MYIMAGE=myimage -t my-repo:1.1.1 --push .
My build runs for about 10 min and eventually errors out after pushing layers with:
ERROR: unexpected status: 401 Unauthorized ------ > exporting to image: ------ error: failed to solve: unexpected status: 401 Unauthorized
Thought by supplying the --driver-opt image=moby/buildkit:v0.9.3 would fix this, but doesn’t look like it is working. Has anyone had any luck resolving this error? Any help would be greatly appreciated.