If you’re currently attached to a docker instance, then first disconnect (detach) from the shell without exiting use the escape sequence Ctrl-p + Ctrl-q.
To view the logs for a container it’s as simple as running just one command. Let’s take a look at the logs for container 2c9d5e12800e :
docker logs 2c9d5e12800e