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
Have you tried running the container in detached mode? I.e. –
docker compose up -d
ordocker compose up --detach
.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.