docker logs
$ docker logs --helpUsage: docker logs [OPTIONS] CONTAINER
Fetch the logs of a container
Options:
--details Show extra details provided to logs
-f, --follow Follow log output
--since string Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)
--tail string Number of lines to show from the end of the logs (default "all")
-t, --timestamps Show timestamps
--until string Show logs before a timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)
We can specify either container name or ID (or just the first several characters of ID which make a unique sequence good enough to distinguish this ID from other IDs)
Example:
$ docker logs my_app >& my_app.log
No comments:
Post a Comment