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.
rimelek
(Ákos Takács)
13
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Executable file not found in $PATH (Alpine Linux) | 4 | 16179 | August 13, 2023 | |
| Enable docker commands run without sudo | 14 | 26467 | April 23, 2023 | |
| Executing a binary file in docker which is in the PATH | 0 | 3375 | February 22, 2016 | |
| Run docker command within container | 2 | 1946 | August 17, 2016 | |
| Shell pipeline and docker run -i | 2 | 1793 | May 1, 2016 |