compose/pkg/api
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
..
api.go logs: filter to services from current Compose file (#9811) 2022-09-08 16:26:00 -04:00
api_test.go move compose API into pkg/api 2021-06-15 15:52:48 +02:00
errors.go Add gocritic to linters 2022-07-13 19:33:03 +02:00
errors_test.go move compose API into pkg/api 2021-06-15 15:52:48 +02:00
labels.go Fix `down` with `--rmi` 2022-08-29 19:48:23 +02:00
proxy.go Code formatting 2022-08-18 22:41:02 +02:00