19.06.2021 Views

148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Docker Log Files

Chapter 14 ■ Configuring Logging

By default the Docker containers log file directories are in the /var/lib/docker/containers directory. CD

(change directory) to the /var/lib/docker/containers directory and list the files and directories. A log

directory exists for each of the Docker containers, as shown in Figure 14-6.

Figure 14-6. Docker container log directories

To access a container directory we need to set permissions with chmod +x as shown in Figure 14-7. Then

CD to the container directory.

Figure 14-7. Setting Permissions on a Docker container log directory

List the files in the container directory as shown in Figure 14-8. The containerid-json.log file is the

log file generated by the container.

Figure 14-8. Listing log files for a Docker container

313

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!