Disable logging for one container in Docker-Compose

You should be able to use logging feature. Try to set driver to none

logging:
    driver: none

Full example:

services:
  website:
    image: nginx
    logging:
      driver: none

In recent versions of docker-compose, if all of the services have disabled logging, docker-compose will act as in detach mode. To force the attached mode you can add a simple silent service like that:

services:
  website:
    image: nginx
    logging:
      driver: none

  force-attach:
    image: bash
    command: tail -f /dev/null

Leave a Comment