Log
DevOps Docker Log
Common command
command | description |
---|---|
docker logs {CONTAINER_NAME} |
Show the log from the container |
docker logs -f {CONTAINER_NAME} |
Keep tracking the log from the container |
docker logs -t --since="2022-12-31T23:59:59" {CONTAINER_NAME} |
Show the log from the specific time |
docker logs -f -t --since="2022-12-31" --tail=100 {CONTAINER_NAME} |
Show the latest 100 record of log from the specific time |
docker logs --since 30m {CONTAINER_NAME} |
Show the latest 30 minutes log |
docker logs -t --since="2022-01-01T00:00:00" --until "2022-12-31T23:59:59" CONTAINER_ID |
Show the log from the specific period |