Error executing command with docker run

It has nothing to do with cat. It is shell expansion. Without running a shell with the command as argument between quotation marks you use the host shell and the command will be sent to the container only after the shell on the host interpreted it. And you need to define a shell, because just using quotation marks makes the defined command to be a reference to a single executable. Which will not exist.