skip to Main Content

I am running docker compose version 2.3.3, I am attempting to disable logging for a single container. Ive tried using:

logging:
    driver: none

However logs for my application still show up within the terminal. I have also tried the –attach option but that doesnt seem available.

2

Answers


  1. Have you tried running the container in detached mode? I.e. – docker compose up -d or docker compose up --detach.

    Login or Signup to reply.
  2. setting the logging driver changes where docker persists captured logs to, and consequently the availability of logs to docker logs / docker compose logs commands.
    Its not going to inhibit stdout/err in the container itself. If you need to quash that, given you have a net core app, you need to edit the LogLevel in appsettings.json to be less verbose. "Warning", or "Error" perhaps.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search