четверг, 8 октября 2015 г.

Docker. Application logging patterns inside container

Here are three patterns on how to get the logs from the Docker container.

First, use -v option to mount a file location inside the container  to the location inside the host file system. The -v option gives you flexibility on where to redirect files.

Second, use centralized logging server. For example, Kafka queues for further processing.

Third, you can use shared volumes from another container to pull logs into another running container. This way can save up processing resources. Imagine that every system runs a service to send logs, than it would be waste of resources to send logs from every container. Instead pull the logs into one container and use a single logging service to send logs.


Комментариев нет:

Отправить комментарий