I am trying to create automated builds in docker hub from GitHub. My dockerfile is targeting a bullseye debian image for linux/arm64 use. I am using emulation on my docker desktop for windows to build these images locally.
However, trying to build them using the docker automated builds I am getting errors such as these:
[Warning] The requested image’s platform (linux/arm64) does not match the detected host platform (linux/amd64) and no specific platform was requested
[91mexec /bin/sh: exec format error
From looking around online I found that these might be related to trying to build to arm64. How do I set up docker autobuilds to properly build to my target platform of linux/arm64?
I found the issue i was missing the --platform=$BUILDPLATFORM from my docker file and also had the hook wrong it should have been #!/bin/bash docker build --platform linux/arm64v8 -t $IMAGE_NAME .