openlang

Reducing docker-compose console noise

Several of my containers produce hundreds upon hundreds of output lines when docker-compose up starts all the services in my development setup. Can that output be filtered conveniently, or ideally could those services avoid writing to standard out while docker-compose up runs?

The conversation continues 3

Follow the reasoning
  1. Permalink

    Start your docker compose containers by choosing its detached mode

    docker-compose up -d

    To inspect the log output produced by your running containers, you can instead run:

    docker-compose logs <your service name from the docker-compose file>
  2. Permalink

    Even with just docker compose up, you can select which services' logs appear through --attach or --no-attach.

    For example

    docker compose up --attach <service>

    Consult the documentation (https://docs.docker.com/engine/reference/commandline/compose_up/#:%7E:text=The%20docker%20compose%20up%20command%20aggregates%20the%20output%20of%20each%20container%20(like%20docker%20compose%20logs%20%2D%2Dfollow%20does).%20One%20can%20optionally%20select%20a%20subset%20of%20services%20to%20attach%20to%20using%20%2D%2Dattach%20flag%2C%20or%20exclude%20some%20services%20using%20%2D%2Dno%2Dattach%20to%20prevent%20output%20to%20be%20flooded%20by%20some%20verbose%20services.)

Other sides of the same question

  1. Could D produce Python extension modules rather than using C?

    Apparently D can link against C. I want to write a Python extension module using D. Is there a reason this approach could nev…

    Replies 2Latest activity d
  2. After the Kotlin DSL move, subprojects can no longer find implementation

    Moving an old multi-project build from the Groovy DSL to the Kotlin DSL. The root build.gradle had this block. The root I con…

    Replies 2Latest activity kotlingroovy
  3. for_each keys are addresses, not labels

    A for_each key isn't a label. It's half of the resource address, terraform_data.queue["prod-orders"], and the state tracks th…

    Replies 5Latest activity hcl