Thanks for reaching Q&A.
Could you please try the login with "az login"?
The command "docker login azure" is to be used on Docker desktop and not inside of ACI running. I was able to reproduce the same issue as yours and this is not the right way to use it.
Hope this helps. Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.