Docker-How To Analyze Container Logs (Frequently used commands)

preview_player
Показать описание
Docker - How to analyze docker container log for any error or any issue reported by user for running application with container

1. How to find LogPath where container stores container logs
2. How to use Docker inspect command with option --format to filter LogPath
3. How to debug any error message
4. Debugging of Container issues

Docker Tutorial Series - Docker Tutorial for Beginners
Рекомендации по теме
Комментарии
Автор

Thank you very much for this awesome and will-explained video, very helpful tips for troubleshooting docker containers

omararias
Автор

very clear cut explanation do more vedios on grafana with real time issues and solutions and trobleshooting

mabashadudekula
Автор

Très intéressant surtout la deuxième partie merci pour le partage.

Eskimoz
Автор

Off course you can do that... use FROM scratch in place of providing any base image.... But this will result in very lightweight image but you have to install all dependency by yourself to make it work.... most of the time Base Image has all those dependency related to OS & we just need to take care on dependencies which are related to our Somehow this will defy one of the important aspect of docker to reduce burden of dependency across the systems or

renujain
Автор

Hi Abhishek, I am using gelf driver to ship nginx docker container logs to graylog server. The nginx container generates a very high volume of logs that is around 8-10 gb of logs on daily basis. Here the problem is docker container stops shipping logs to graylog after around 2 days. For the temporary solution i restart the nginx container and it starts shipping log and again after 2 days log shipment stops and the same issue occurs. I have configured log rotation inside nginx docker container and the logs gets rotated daily. I guess but not sure, that the issue persists at docker container end, that may be it stops writing logs to the console (std/stderr) but not sure, where can i see the error logs . Any help will be much appreciated.

rajnishsagar
Автор

It hard to tell what exactly causing the issue until have more specific about infrastructure followed by what is going on at container level... Could you please let me know what happens with docker container once it stops routing logs.. Does containerized application shows any adverse effect or it is just container logs .... However there can be lot of situation & based on that only I would be able to help.... Because if Dockerized application is also getting stopped after 2 days then it is easy to fix but application works fine then it would be trickiest situation to find out what is going on at infra level.... Could you please monitor docker container various matrix on prometheus or grafana to get more granular information about which attribute is causing this....

renujain
Автор

if a container deads then how to get logs and give RCA to the customer. - bc's restart container rewrites the logs right!

emanasa
Автор

What if docker not showing any logs at all? Or logs are disabled?

rajavenkateshmohan
Автор

How to check logs for first 10lines in docker?

sagarpantagani
Автор

Hi Abhishek, i am getting below error when hitting command to check for errors


Template parsing error: template: :1:2: executing "" at <.logpath>: map has no entry for key "logpath"


how can i find path for my container ? Could you please suggest me way forward
Note:- I am using docker in one of our L2 device (FRU)

review
Автор

Sir can I create a docker image without a base image?

srujanareddy