All run instructions are executed in a shell. That’s normal. And the error message is not the exact command that fails. Quotation marks are missing from these kind of errors. What happens is that the command you run simply fails and you need to find out why. Run a container interactively from the base image and execute the commands manually.
If I had to guess, I would say you added the ENV variable to the end of the file instead of before the RUN instruction so APT could ask for use rinput. If it is true, then running the commands interactively would not fail.
Notice what I wrote about running the command interactively. Also please, don’t share screenshots of texts. Follow the below guide to format your post and use code blocks. You can see how it looks like after I edited your first post