Python is not found, so $ARCH gets assigned to "", and you didn't double quote your variables in the comparison, so the code parses as [ == "aarch64" which is a syntax error.
Also, maybe uname -m could work instead of that Python script.
Python is not on the Path for docker. The error message "python: command not found" is then passed to the [ command (also called test) which says too many arguments.
Add the path /use/bin/ to your python command. Or figure out why it isn't on the docker path.
You should use python3 anyway not python. The latter is sometimes Python 3, sometimes Python 2 and sometimes doesn't exist. python3 works reliably, assuming you have it installed.
(And assuming you aren't using the official Windows Python installer, but that doesn't seem like the case here!)
Apologies, I thought it was Python because I was trying to execute a Python script. And double sorry for not knowing how to interpret the error message.
It looks like you’ve already found an answer, but I have some follow up thoughts if you’re open. Seems like this Python script is used to determine system architecture, to facilitate running in many different environments. However, once you move into a Dockerfile, you have strict control over what arch you’re using (via selection of a base image). Rather than adding Python to the image, you might be able to cut out this conditional and simply hard-code the path which is appropriate for you.