Difference between revisions of "Docker logs"
Jump to navigation
Jump to search
(14 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<code>docker [[logs]]</code> command allows to view the [[logs]] of a [[container]]. https://docs.docker.com/engine/reference/commandline/logs/ | <code>docker [[logs]]</code> command allows to view the [[logs]] of a [[container]]. https://docs.docker.com/engine/reference/commandline/logs/ | ||
+ | docker logs CONTAINER_NAME [[2]]>[[&1]] | [[grep]] -v INFO | ||
− | docker logs | + | [[docker logs --timestamps]] |
docker logs -f --tail 10 CONTAINER_NAME | docker logs -f --tail 10 CONTAINER_NAME | ||
+ | [[docker ps -q]] | [[xargs -L]] 1 docker logs | ||
--[[log-driver]]=[[journald]] | --[[log-driver]]=[[journald]] | ||
--log-driver=[[json-file]] | --log-driver=[[json-file]] | ||
− | == Related | + | Rancher: |
+ | [[docker logs kubelet]] | ||
+ | [[docker logs etcd]] | ||
+ | |||
+ | |||
+ | == Related == | ||
+ | * <code>[[docker --help]]</code> | ||
* <code>[[docker container]] logs</code> | * <code>[[docker container]] logs</code> | ||
* <code>[[docker-compose logs]]</code> | * <code>[[docker-compose logs]]</code> | ||
* <code>[[docker logs]]</code>, <code>[[docker logs]] -f</code> | * <code>[[docker logs]]</code>, <code>[[docker logs]] -f</code> | ||
− | * [[Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?]] | + | * <code>[[Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?]]</code> |
* <code>[[docker run]] -d --[[log-driver]]=[[journald]] YOUR_CONTAINER</code> | * <code>[[docker run]] -d --[[log-driver]]=[[journald]] YOUR_CONTAINER</code> | ||
* <code>[[docker system events]]</code> | * <code>[[docker system events]]</code> | ||
* <code>[[journalctl -u docker]]</code> | * <code>[[journalctl -u docker]]</code> | ||
* <code>[[minikube logs]]</code> | * <code>[[minikube logs]]</code> | ||
+ | * <code>[[docker ps]]</code> | ||
+ | * [[Fluent Bit]] | ||
+ | * [[dockerd]] | ||
+ | * [[/var/log/containers/]] | ||
== See also == | == See also == | ||
+ | * {{docker logs}} | ||
* {{Docker logging}} | * {{Docker logging}} | ||
− | |||
− | |||
[[Category:Docker]] | [[Category:Docker]] |
Latest revision as of 10:46, 14 December 2023
docker logs
command allows to view the logs of a container. https://docs.docker.com/engine/reference/commandline/logs/
docker logs CONTAINER_NAME 2>&1 | grep -v INFO
docker logs --timestamps
docker logs -f --tail 10 CONTAINER_NAME
docker ps -q | xargs -L 1 docker logs
--log-driver=journald --log-driver=json-file
Rancher:
docker logs kubelet docker logs etcd
Related[edit]
docker --help
docker container logs
docker-compose logs
docker logs
,docker logs -f
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
docker run -d --log-driver=journald YOUR_CONTAINER
docker system events
journalctl -u docker
minikube logs
docker ps
- Fluent Bit
- dockerd
- /var/log/containers/
See also[edit]
Advertising: