C
C
Coder3212017-06-21 22:53:26
linux
Coder321, 2017-06-21 22:53:26

How to view Docker logs?

There is an aws server on which the image with the node is spinning. If a node crashes, ABC rebuilds the image. Is it possible to somehow see the logs of why the node is falling?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Rozhkov, 2017-06-24
@r0zh0k

AWS does not rebuild the image, AWS restarts the container if it has completed.
Your container is most likely writing logs to stdout.
Log in to the instance via SSH, then do docker ps -a, you will see the just completed container there. AWS used to leave them, but now, due to the update of the ECS agent, apparently, it cleans them up, so you may not see your container.
If the old container still remains, then you can still see its logs -  docker logs <container_id>
However, it is advisable to attach an external logging service, such as LogEntries, Papertrail or other similar systems.

V
Vladimir Kuts, 2017-06-22
@fox_12

docker logs <container name>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question