How to View Logs for a Docker Container

View Logs for a Docker Container

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

  • 68 Users Found This Useful
Was this answer helpful?

Related Articles

How to Add a User and Grant Root Privileges on CentOS 6.5

Step 1: Add the User It’s just one simple command to add a user. In this case, we’re...

Update and Patch OpenSSL on Ubuntu for the CCS Injection Vulnerability

What is OpenSSL? OpenSSL is a common cryptographic library which provides encryption,...

How to Disable SSLv3 for Apache and Protect Your WHM/cPanel Server from POODLE

There’s a new POODLE in town, but unfortunately it’s not the kind of pooch you want around....

How to Completely Disable Automatic Background Updates for WordPress

The following process works with all WordPress versions after version 3.7. Alas, turning off...

How to Display (List) All Jobs in Cron / Crontab

Servers can automatically perform tasks that you would otherwise have to perform yourself, such...

Powered by WHMCompleteSolution