docker container logs

Estimated reading time: 2 minutes

Description

Fetch the logs of a container

Usage

docker container logs [OPTIONS] CONTAINER

Options

Name, shorthandDefaultDescription
--detailsShow extra details provided to logs
--follow , -fFollow log output
--sinceShow logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)
--tailallNumber of lines to show from the end of the logs
--timestamps , -tShow timestamps
--untilAPI 1.35+ 
Show logs before a timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)

Parent command

CommandDescription
docker containerManage containers
CommandDescription
docker container attachAttach local standard input, output, and error streams to a running container
docker container commitCreate a new image from a container’s changes
docker container cpCopy files/folders between a container and the local filesystem
docker container createCreate a new container
docker container diffInspect changes to files or directories on a container’s filesystem
docker container execRun a command in a running container
docker container exportExport a container’s filesystem as a tar archive
docker container inspectDisplay detailed information on one or more containers
docker container killKill one or more running containers
docker container logsFetch the logs of a container
docker container lsList containers
docker container pausePause all processes within one or more containers
docker container portList port mappings or a specific mapping for the container
docker container pruneRemove all stopped containers
docker container renameRename a container
docker container restartRestart one or more containers
docker container rmRemove one or more containers
docker container runRun a command in a new container
docker container startStart one or more stopped containers
docker container statsDisplay a live stream of container(s) resource usage statistics
docker container stopStop one or more running containers
docker container topDisplay the running processes of a container
docker container unpauseUnpause all processes within one or more containers
docker container updateUpdate configuration of one or more containers
docker container waitBlock until one or more containers stop, then print their exit codes