from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites:gentoo.linuxhowtos.org



Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

209586

userrating:


May 25th. 2007:
Words

486

Views

258592

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

149883

userrating:


April, 26th. 2006:

Druckversion
You are here: manpages





DOCKER

Section: Docker User Manuals (1)
Updated: Jun 2025
Index Return to Main Contents

 

NAME

docke-containe-logs- Fetch the logs of a container

 

SYNOPSIS

docker container logs [OPTIONS] CONTAINER

 

DESCRIPTION

The docker container logs command batc-retrieves whatever logs are present for a container at the time of execution. This does not guarantee execution order when combined with a docker run (i.e., your run may not have generated any logs at the time you execute docker container logs).

The docker container logs-follow command combines commands docker container logs and docker attach. It will first return all logs from the beginning and then continue streaming new output from the container's stdout and stderr.

Warning: This command works only for the jso-file or journald logging drivers.

The -since and -until options can be Unix timestamps, date formatted timestamps, or Go duration strings supported by ParseDuration [la]https://pkg.go.dev/time#ParseDuration[ra] (e.g. 10m, 1h30m) computed relative to the client machine's time. Supported formats for date formatted time stamps include RFC3339Nano, RFC3339, 200-0-02T15:04:05, 200-0-02T15:04:05.999999999, 200-0-02T07:00, and 200-0-02. The local timezone on the client will be used if you do not provide either a Z or a -00:00 timezone offset at the end of the timestamp. When providing Unix timestamps enter seconds[.nanoseconds], where seconds is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a fraction of a second no more than nine digits long. You can combine the -since or -until options with either or both of the -follow or -tail options.

The docker container logs-details command will add on extra attributes, such as environment variables and labels, provided to -lo-opt when creating the container.

In order to retrieve logs before a specific point in time, run:

$ docker run-name test-d busybox sh-c "while true; do $(echo date); sleep 1; done" $ date Tue 14 Nov 2017 16:40:00 CET $ docker logs-f-until=2s test Tue 14 Nov 2017 16:40:00 CET Tue 14 Nov 2017 16:40:01 CET Tue 14 Nov 2017 16:40:02 CET

 

OPTIONS

-details[=false]         Show extra details provided to logs

-f, -follow[=false]         Follow log output

-since=""         Show logs since timestamp (e.g. "201-0-02T13:23:37Z") or relative (e.g. "42m" for 42 minutes)

-n, -tail="all"         Number of lines to show from the end of the logs

-t, -timestamps[=false]         Show timestamps

-until=""         Show logs before a timestamp (e.g. "201-0-02T13:23:37Z") or relative (e.g. "42m" for 42 minutes)

 

SEE ALSO

docke-container(1)


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
SEE ALSO





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 14.1 ms