Search code examples
dockerdocker-composebuildprogress

docker 27.5.0, how can I perform a docker compose up --build while showing all RUN output?


In the past I could use docker-compose up --build and see all output from the Dockerfile RUN commands. Then things changed and that output was cached and abstracted away from me. Now it seems there is docker-compose plugin in docker now, so docker-compose is not needed. I found that I can use this to see all output

DOCKER_BUILDKIT=1 docker compose build --progress=plain --no-cache

But this does not bring up the container just builds the image. I need up --build and allow it to show all RUN commands.

How can I accomplish this now just using docker compose plugin. Is it possible? If not what other options do I have?


Solution

  • You can configure your shell with export BUILDKIT_PROGRESS=plain, or directly in your command:

    BUILDKIT_PROGRESS=plain docker compose up --build
    

    This syntax applies to a Linux shell like bash, different methods to set environment variables may be needed on Windows.