compose/cmd
Milas Bowman 61845dd781
logs: filter to services from current Compose file (#9811)
* 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 #9705.

Fixes #9801.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-09-08 16:26:00 -04:00
..
compatibility Merge pull request #9507 from TheodosiouTh/tc/simplify-flag-conversion 2022-07-04 09:19:21 +02:00
compose logs: filter to services from current Compose file (#9811) 2022-09-08 16:26:00 -04:00
formatter lint: add `nolintlint` and clean up `nolint` directives (#9738) 2022-08-09 16:43:58 -04:00
main.go Remove dead warning code 2022-03-31 16:42:04 +02:00