Blog Archive for May 4, 2018

Grepping Docker Logs

May 4, 2018

Some of the things in docker logs are written to stdout and others to stderr. If you grep like this:

$ docker logs my-docker-container | grep "Thing that doesn't exist in the file"

The output will show any lines from the docker log that were written to stderr. This may …