Skip to content

"docker-compose logs" should not fail if not specifying directly the service with non-readable logging driver #8136

@lephuongbg

Description

@lephuongbg

Description of the issue

This is an usability issue. After #8082, running docker-compose logs will quit with ERROR: configured logging driver does not support reading, if any of the services has logging.driver: none. I would expect:

  • docker-compose logs (without service name) to automatically ignore those containers (like docker-compose up), possibly showing a warning instead of error.
  • docker-compose logs service-name will fail if the service has logging.driver: none

Context information (for bug reports)

Output of docker-compose version

docker-compose version 1.28.3, build 14736152

Output of docker version

Docker version 20.10.3, build 48d30b5

Output of docker-compose config

services:
  nginx:
    image: openresty/openresty:alpine
    logging:
        driver: 'none'
  echo:
    image: node:alpine
    command: [npx, http-echo-server]

Steps to reproduce the issue

  1. Run docker-compose up -d
  2. Run docker-compose logs -f

Observed result

Attaching to test-project_nginx_1, test-project_echo_1
ERROR: configured logging driver does not support reading

Expected result

docker-compose can attach to logs of echo service, ignoring nginx service.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions