Default Docker Engine logs

Inside of the Docker Engine box, we can see two containers running and how their logs are being written to the host filesystem in JSON format. These logs can be accessed from the Docker container logs command, as shown in the Terminal window:

Figure 1: The settings for Docker contain

The settings for Docker container logging can be adjusted by modifying a file located in the /etc/docker directory called daemon.json. Looking at the following listing, you can see the listing from a sample daemon.json file that I would strongly recommend as a default configuration. In the following file, you can see that the log-driver ...

Get Mastering Docker Enterprise now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.