docker / docker/cli

[Feature]. `logs` command. Add ability to `--follow` container's restarts

Open
#3,426 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature
Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

Description

When invoking logs command in cli, there's no ability to --follow container's restarts.
So if a container stops, the process exits.

Current workaround is to either:

  • use Docker Desktop to watch logs of a container there
  • or add a watcher that would retrigger docker logs ... containerId command
    • this is not ideal, as it makes the users-developers to manage a watcher implementation themselves

Related issue

Output of docker version:

Docker version 20.10.12, build e91ed57

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the CLI implementation and tests for the logs command, then review the related Docker CLI issue linked in the report. Define the expected behavior for --follow when the container restarts and verify that log streaming continues after a restart without requiring an external watcher.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.