View logs of container
The logs command allows to fetch the logs of a container.
# docker logs [OPTIONS] CONTAINER
# follow log output
docker logs -f container_name
options | description |
---|---|
--details | Show extra details provided to logs. |
--follow , -f | Allows view new output from the container’s STDOUT and STDERR in real time. |
--since | Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes). |
--until | Show logs before a timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes). |
--timestamps , -t | Show timestamps. |
--tail | Specifies a number of lines to show from the end of the logs. By default all lines will be shown. |