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

  • 97 Users Found This Useful
Was this answer helpful?

Related Articles

How to Display MySQL Storage Engines

How to Display MySQL Storage Engines From the MySQL command line, issue the following command:...

How To Install Git on Ubuntu 14.04

Introduction Git is an open source, distributed version control system (VCS). It’s...

How to Install VNC Server on Ubuntu 14.04 LTS

VNC is short for ‘Virtual Network Computing’. It’s a simple method for sharing a graphical...

How to Check the glibc (GNU libc) Version on CentOS 6 and CentOS 7

Using ldd ldd --version This should return a result similar to: ldd (GNU libc) 2.17Copyright...

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