How to live tail Docker logs?
To view docker logs we use the docker logs command.
docker logs <container-id>
Advertisements
We would usually want to view live logs from a file using tail linux command. But this doesn’t work with docker logs. We need send –follow flag to docker logs command to tail logs.
docker logs --follow <container-id>
An example:
Advertisements
docker logs --follow ca5947cbaac1
This would tail the currently logged text in the docker log file.