There is an issue with the powershell docker image mcr.microsoft.com/powershell when run on ARM Macs. It doesn’t do the architecture properly and running a container will return an error exec /usr/bin/pwsh: exec format error
. One solution, for now, is to use the mcr.microsoft.com/powershell:preview-mariner-2.0-arm64 image.
docker run --rm -it mcr.microsoft.com/powershell:preview-mariner-2.0-arm64