Disable output of a container

Hello all,

dont know, if this question is in the correct category, but:

I start my docker-composer containers (docker-compose.yml) from the bash:

docker-compose up

I would not like to change this, because i need the output of most of my containers.

BUT: one container is messing up the whole log with useless outputs of internal processes. So i would like to ignore/suppress/hide the output of one container.

I already tried tricks without any effect & success:

logging:
driver: “none”

Could you pls help me ?

Thanks,
Kim

services:
  s1:
    image: nginx
  s2:
    image: nginx
  s3:
    image: nginx
docker compose up --no-attach s2

or

docker compose up --attach s1 --attach s3

At least it works with Compose v2.

PS.: Please use code blocks for code snippets instead of quotes so the forum keeps the indentation. More info: How to format your forum posts

Edit:

I incorrectly wrote that it worked with Compose v1. I meant Compose v2 so I fixed my comment.

1 Like