Skip to content

Instantly share code, notes, and snippets.

@khandelwaly
Created May 8, 2020 06:05
Show Gist options
  • Select an option

  • Save khandelwaly/33ec9d680f582aed6ef82e728cc8432d to your computer and use it in GitHub Desktop.

Select an option

Save khandelwaly/33ec9d680f582aed6ef82e728cc8432d to your computer and use it in GitHub Desktop.
docker logs --tail 1 -ft <container name>
docker logs --help

Usage:	docker logs [OPTIONS] CONTAINER

Fetch the logs of a container

Options:
      --details        Show extra details provided to logs
  -f, --follow         Follow log output
      --since string   Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)
      --tail string    Number of lines to show from the end of the logs (default "all")
  -t, --timestamps     Show timestamps
      --until string   Show logs before a timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment