In the 3rd Docker container tutorial I demonstrate how to run commands from a docker container when on the host.
This uses the docker exec command
Want to learn more about Docker? Peter Fisher is the author of Docker In Motion. This interactive online course will teach you the fundamentals of Docker http://bit.ly/2vvz2sA