Skip to content

[BUG] Compose STILL does not observe the BUILDKIT_PROGRESS environement variable #13088

Closed

Description

@molguin92

Description

Buildkit provides ways of configure non-pretty (plain) build progress output through either a runtime flag (--progress=plain) or via an environment variable (BUILDKIT_PROGRESS=plain). Compose currently ignores the environment variable.

Support for the environment variable was supposed to be added in #12458 (released in Compose v2.33.0). This didn't work, and was then supposed to be fixed in #12894 (released in Compose v2.37.0). This again does not seem to work.

Steps To Reproduce

  1. Run a Compose stack using the BUILDKIT_PROGRESS=plain environment variable:
    BUILDKIT_PROGRESS=plain docker compose up
  2. Expected output: plaintext build and stack output, equivalent to running Compose with the --progress=plain flag.
  3. Actual output: pretty output with paging, colors, and multiple output streams writing to the terminal at the same time.

Compose Version

$> docker-compose version && docker compose version
Docker Compose version 2.38.2
Docker Compose version 2.38.2

Docker Environment

Client: Docker Engine - Community
 Version:    28.3.2
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.26.1
    Path:     /opt/homebrew/lib/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  2.38.2
    Path:     /opt/homebrew/lib/docker/cli-plugins/docker-compose

Server:
 Containers: 5
  Running: 0
  Paused: 0
  Stopped: 5
 Images: 126
 Server Version: 27.4.0
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 88bf19b2105c8b17560993bee28a01ddc2f97182
 runc version: v1.2.2-0-g7cb3632
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.8.0-62-generic
 Operating System: Ubuntu 24.04.2 LTS
 OSType: linux
 Architecture: aarch64
 CPUs: 6
 Total Memory: 15.58GiB
 Name: colima
 ID: 89601753-b543-4b7b-b5d6-b538bfa0ec99
 Docker Root Dir: /var/lib/docker
 Debug Mode: true
  File Descriptors: 34
  Goroutines: 76
  System Time: 2025-07-23T11:26:33.205427892-07:00
  EventsListeners: 0
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Anything else?

This issue is effectively a re-opening/duplicate of issue 12457.

Activity

  1. changed the title [-][BUG] Compose does STILL not observe the BUILDKIT_PROGRESS environement variable[/-] [+][BUG] Compose STILL does not observe the BUILDKIT_PROGRESS environement variable[/+] on Jul 23, 2025
  2. ndeloof commented on Jul 24, 2025

    @ndeloof
    Contributor

    Can't reproduce with latest codebase:

    $ BUILDKIT_PROGRESS=plain docker compose up --build
    #1 [internal] load local bake definitions
    #1 reading from stdin 498B done
    #1 DONE 0.0s
    
    #2 [internal] load build definition from Dockerfile
    #2 transferring dockerfile: 128B done
    #2 DONE 0.0s
    
    #3 [internal] load metadata for docker.io/library/golang:alpine
    #3 DONE 0.0s
    
    #4 [internal] load .dockerignore
    #4 transferring context: 2B done
    #4 DONE 0.0s
    
    #5 [1/4] FROM docker.io/library/golang:alpine
    #5 DONE 0.0s
    
    #6 [internal] load build context
    #6 transferring context: 1.39kB done
    #6 DONE 0.0s
    
    #7 [2/4] WORKDIR /app
    #7 CACHED
    
    #8 [3/4] COPY . .
    #8 DONE 0.0s
    
    #9 [4/4] RUN go build -o hello main.go
    #9 DONE 2.1s
    
    #10 exporting to image
    #10 exporting layers 0.1s done
    #10 writing image sha256:b50b319c63741fd6d6060ff98fc267b0633aa517ebafc62345b9c592e428bd6e done
    #10 naming to docker.io/library/truc-test done
    #10 DONE 0.1s
    
    #11 resolving provenance for metadata file
    #11 DONE 0.0s
    [+] Running 2/2
     ✔ truc-test              Built                                                                                                                                                                                                        0.0s 
     ✔ Container truc-test-1  Recreated                                                                                                                                                                                                    0.0s 
    Attaching to test-1
    test-1  | Hello, World!
    
  3. glours commented on Jul 24, 2025

    @glours
    Contributor

    Hey @molguin92
    Can you provide us a repo use case?
    Like @ndeloof I'm not able to reproduce

    > BUILDKIT_PROGRESS=plain docker compose up --build                                                                                                                          12:10:29
    [+] Running 11/11
     ✔ db Pulled                                                                                                                                                                                                                              8.9s
       ✔ 237a1faa6f2f Pull complete                                                                                                                                                                                                           0.1s
       ✔ 5439b732292c Pull complete                                                                                                                                                                                                           0.1s
       ✔ 03dca6f0a44e Pull complete                                                                                                                                                                                                           3.1s
       ✔ 06349c44b1c2 Pull complete                                                                                                                                                                                                           3.2s
       ✔ 66c8c73e9d3d Pull complete                                                                                                                                                                                                           2.1s
       ✔ e492d94f0d1a Pull complete                                                                                                                                                                                                           7.9s
       ✔ f041e317f1ed Pull complete                                                                                                                                                                                                           0.1s
       ✔ 67d6255a4e93 Pull complete                                                                                                                                                                                                           2.4s
       ✔ 79173b691e5e Pull complete                                                                                                                                                                                                           0.1s
       ✔ 8ed6c6bd5d54 Pull complete                                                                                                                                                                                                           0.1s
    #1 [internal] load local bake definitions
    #1 reading from stdin 959B done
    #1 DONE 0.0s
    
    #2 [api internal] load build definition from api.dockerfile
    #2 transferring dockerfile: 403B done
    #2 DONE 0.1s
    
    #3 [web internal] load build definition from web.dockerfile
    #3 transferring dockerfile: 372B done
    #3 DONE 0.1s
    
    #4 [web internal] load metadata for docker.io/library/node:18-bullseye-slim
    #4 ...
    
    #5 [auth] library/python:pull token for registry-1.docker.io
    #5 DONE 0.0s
    
    #6 [auth] library/node:pull token for registry-1.docker.io
    #6 DONE 0.0s
    
    #7 [api internal] load metadata for docker.io/library/python:3.10-slim-bullseye
    #7 ...
    
    #4 [web internal] load metadata for docker.io/library/node:18-bullseye-slim
    #4 DONE 1.0s
    
    #8 [web internal] load .dockerignore
    #8 transferring context: 95B done
    #8 DONE 0.0s
    
    #9 [web internal] load build context
    #9 transferring context: 928B done
    #9 DONE 0.1s
    ...
  4. molguin92 commented on Jul 24, 2025

    @molguin92
    Author

    Minimal example:

    Dockerfile

    FROM debian:bookworm
    CMD ["echo", "hello world!"]

    compose.yaml

    name: hello-world
    services:
      hello-world:
        build:
          dockerfile: ./Dockerfile

    Expected output (running with --progress=plain):

    $> docker compose --progress=plain up --build --force-recreate
    #1 [internal] load local bake definitions
    #1 reading from stdin 416B done
    #1 DONE 0.0s
    
    #2 [internal] load build definition from Dockerfile
    #2 transferring dockerfile: 87B done
    #2 DONE 0.0s
    
    #3 [internal] load metadata for docker.io/library/debian:bookworm
    #3 DONE 0.6s
    
    #4 resolving provenance for metadata file
    #4 DONE 0.0s
    
    #5 [internal] load .dockerignore
    #5 transferring context: 2B done
    #5 DONE 0.0s
    
    #6 [1/1] FROM docker.io/library/debian:bookworm@sha256:b6507e340c43553136f5078284c8c68d86ec8262b1724dde73c325e8d3dcdeba
    #6 CACHED
    
    #7 exporting to image
    #7 exporting layers done
    #7 writing image sha256:a19ff2a399f0ca73c8af4a88466e1dd19c1cc5d8a7e08b42172b3f73d579e07f done
    #7 naming to docker.io/library/hello-world-hello-world done
    #7 DONE 0.0s
     hello-world  Built
     Network hello-world_default  Creating
     Network hello-world_default  Created
     Container hello-world-hello-world-1  Creating
     Container hello-world-hello-world-1  Created
    Attaching to hello-world-1
    hello-world-1  | hello world!
    hello-world-1 exited with code 0

    Actual output (with BUILDKIT_PROGRESS=plain):

    $> BUILDKIT_PROGRESS=plain docker compose up --build --force-recreate
    [+] Building 0.7s (7/7) FINISHED
     => [internal] load local bake definitions                                                                                                                                                                                                                                                                               0.0s
     => => reading from stdin 416B                                                                                                                                                                                                                                                                                           0.0s
     => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                     0.0s
     => => transferring dockerfile: 87B                                                                                                                                                                                                                                                                                      0.0s
     => [internal] load metadata for docker.io/library/debian:bookworm                                                                                                                                                                                                                                                       0.5s
     => [internal] load .dockerignore                                                                                                                                                                                                                                                                                        0.0s
     => => transferring context: 2B                                                                                                                                                                                                                                                                                          0.0s
     => CACHED [1/1] FROM docker.io/library/debian:bookworm@sha256:b6507e340c43553136f5078284c8c68d86ec8262b1724dde73c325e8d3dcdeba                                                                                                                                                                                          0.0s
     => exporting to image                                                                                                                                                                                                                                                                                                   0.0s
     => => exporting layers                                                                                                                                                                                                                                                                                                  0.0s
     => => writing image sha256:a19ff2a399f0ca73c8af4a88466e1dd19c1cc5d8a7e08b42172b3f73d579e07f                                                                                                                                                                                                                             0.0s
     => => naming to docker.io/library/hello-world-hello-world                                                                                                                                                                                                                                                               0.0s
     => resolving provenance for metadata file                                                                                                                                                                                                                                                                               0.0s
    [+] Running 3/3
     ✔ hello-world                          Built                                                                                                                                                                                                                                                                            0.0s
     ✔ Network hello-world_default          Created                                                                                                                                                                                                                                                                          0.1s
     ✔ Container hello-world-hello-world-1  Created                                                                                                                                                                                                                                                                          0.0s
    Attaching to hello-world-1
    hello-world-1  | hello world!
    hello-world-1 exited with code 0

    Docker environment info (same as before, but just in case):

    $> brew list --versions | grep docker
    docker 28.3.2
    docker-buildx 0.26.1
    docker-completion 28.3.2
    docker-compose 2.38.2
    docker-credential-helper 0.9.3
    
    $> docker compose version
    Docker Compose version 2.38.2
    
    $> docker info
    Client: Docker Engine - Community
     Version:    28.3.2
     Context:    default
     Debug Mode: false
     Plugins:
      buildx: Docker Buildx (Docker Inc.)
        Version:  v0.26.1
        Path:     /opt/homebrew/lib/docker/cli-plugins/docker-buildx
      compose: Docker Compose (Docker Inc.)
        Version:  2.38.2
        Path:     /opt/homebrew/lib/docker/cli-plugins/docker-compose
    
    Server:
     Containers: 6
      Running: 0
      Paused: 0
      Stopped: 6
     Images: 153
     Server Version: 27.4.0
     Storage Driver: overlay2
      Backing Filesystem: extfs
      Supports d_type: true
      Using metacopy: false
      Native Overlay Diff: true
      userxattr: false
     Logging Driver: json-file
     Cgroup Driver: cgroupfs
     Cgroup Version: 2
     Plugins:
      Volume: local
      Network: bridge host ipvlan macvlan null overlay
      Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
     Swarm: inactive
     Runtimes: io.containerd.runc.v2 runc
     Default Runtime: runc
     Init Binary: docker-init
     containerd version: 88bf19b2105c8b17560993bee28a01ddc2f97182
     runc version: v1.2.2-0-g7cb3632
     init version: de40ad0
     Security Options:
      apparmor
      seccomp
       Profile: builtin
      cgroupns
     Kernel Version: 6.8.0-62-generic
     Operating System: Ubuntu 24.04.2 LTS
     OSType: linux
     Architecture: aarch64
     CPUs: 6
     Total Memory: 15.58GiB
     Name: colima
     ID: 89601753-b543-4b7b-b5d6-b538bfa0ec99
     Docker Root Dir: /var/lib/docker
     Debug Mode: true
      File Descriptors: 35
      Goroutines: 78
      System Time: 2025-07-24T13:32:52.800137984-07:00
      EventsListeners: 0
     Experimental: false
     Insecure Registries:
      127.0.0.0/8
     Live Restore Enabled: false
    
    WARNING: bridge-nf-call-iptables is disabled
    WARNING: bridge-nf-call-ip6tables is disabled

    NB: I'm on macOS, and I use colima instead of Docker Desktop.

  5. self-assigned this
    on Jul 29, 2025
  6. glours commented on Jul 29, 2025

    @glours
    Contributor

    Hello @molguin92
    It should been fixed by this PR
    Can you confirm you don't have the issue anymore with version v2.39.0 or above?

  7. molguin92 commented on Jul 30, 2025

    @molguin92
    Author

    Hi @glours

    Can confirm that issue is no longer present on my end with version >=2.39.0 (currently on v2.39.1). Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions