In cases such as restoring a database dump, or otherwise wishing to push some information through a pipe from the host, you can use the -i flag as an argument to docker run or docker exec.
E.g., assuming you want to put to a containerized mariadb client a database dump that you have on the host, in...