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

  • 77 Users Found This Useful
Was this answer helpful?

Related Articles

How to List Compiled PHP Modules from Command Line

Pre-Flight Check These instructions are intended specifically for listing compiled PHP modules...

Locations of Common Log Files on cPanel Servers

One of the nice things about cPanel based servers is the way that they keep the location of key...

How to Check Your CentOS Version

The following command works with all CentOS versions. cat /etc/centos-release You should...

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 Install Logwatch on Fedora 20

Logwatch is a Perl-based log management tool for analyzing, summarizing, and reporting on a...

Powered by WHMCompleteSolution