Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logs: filter to services from current Compose file #9811

Merged
merged 2 commits into from
Sep 8, 2022

Commits on Sep 6, 2022

  1. logs: filter to services from current Compose file

    When using the file model, only attach to services
    referenced in the active Compose file.
    
    For example, let's say you have `compose-base.yaml`
    and `compose.yaml`, where the former only has a
    subset of the services but are both run as part of
    the same named project.
    
    Project based command:
    ```
    docker compose -p myproj logs
    ```
    This should return logs for active services based
    on the project name, regardless of Compose file
    state on disk.
    
    File based command:
    ```
    docker compose --file compose-base.yaml logs
    ```
    This should return logs for ONLY services that are
    defined in `compose-base.yaml`. Any other services
    are considered 'orphaned' within the context of the
    command and should be ignored.
    
    See also docker#9705.
    
    Fixes docker#9801.
    
    Signed-off-by: Milas Bowman <milas.bowman@docker.com>
    milas committed Sep 6, 2022
    Configuration menu
    Copy the full SHA
    5cd47d8 View commit details
    Browse the repository at this point in the history
  2. logs: add license to new file

    Signed-off-by: Milas Bowman <milas.bowman@docker.com>
    milas committed Sep 6, 2022
    Configuration menu
    Copy the full SHA
    9daf734 View commit details
    Browse the repository at this point in the history