docker exec
docker exec [-it] <container> <command>
Risk: Safe
What it does
Runs a command inside a running container.
When to use it
To look around inside, or check a file.
Example
$ docker exec -it web shStep inside web. exit brings you back.
$ docker exec web ls /usr/share/nginx/htmlRun one command and come back.
Learn it in: Step inside with exec · Official docs