这是indexloc提供的服务,不要输入任何密码
Skip to content

[BUG] Updating 2.38.2 to 2.39.x changes docker compose build output progress to plain #13099

@ToshY

Description

@ToshY

Description

When updating docker compose from v2.38.2 to v2.39.0, the output of docker compose build / docker compose up --build in the terminal has changed to plain.

I am running these commands in the terminal (WSL2), so I think this is a bug released in 2.39.0 caused by #13074.

When explicitely trying --progress=tty in v2.38.2 it works and shows the build output.

$ docker compose --progress=tty up -d --build
[+] Building 1.1s (8/8) FINISHED
 => [internal] load local bake definitions                                                                                                                                                                  0.0s
 => => reading from stdin 394B                                                                                                                                                                              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
 => => resolve docker.io/library/debian:bookworm@sha256:b6507e340c43553136f5078284c8c68d86ec8262b1724dde73c325e8d3dcdeba                                                                                    0.0s
 => exporting to docker image format                                                                                                                                                                        0.3s
 => => exporting layers                                                                                                                                                                                     0.0s
 => => exporting manifest sha256:a1f4177034ca86ae0dd77c3a0f3b7051dcd2e2c6c1563edc63a39c8b7712d61a                                                                                                           0.0s
 => => exporting config sha256:466a98363892fcc85bbab0a92d292999b291e34f24ca80ab7394e7f7c2dce937                                                                                                             0.0s
 => => sending tarball                                                                                                                                                                                      0.3s
 => importing to docker                                                                                                                                                                                     0.0s
 => resolving provenance for metadata file                                                                                                                                                                  0.0s
[+] Running 2/2
 ✔ hello-world                          Built                                                                                                                                                               0.0s
 ✔ Container hello-world-hello-world-1  Started

But when using --progress=tty in v2.39.x it shows failed to get console: output is not a file.

$ docker compose --progress=tty up --build
failed to get console: output is not a file

Tried adding BUILDKIT_PROGRESS=tty (or auto) to force the progress to be anything else but plain, but it has no effect, both in v2.38.2 and v2.39.x. That might be more related to #12457 and #13088.

The docker buildx bake command still uses BUILDKIT_PROGRESS correctly, so seems something related to compose.

Steps To Reproduce

./Dockerfile
FROM debian:bookworm
CMD ["echo", "hello world!"]
./compose.yaml
name: hello-world
services:
  hello-world:
    build:
      dockerfile: ./Dockerfile
  1. Update docker compose from v2.38.2 to v2.39.0 / v2.39.1.
  2. Run docker compose up -d --build or docker compose build in terminal.
  3. Output is plaintext.
$ docker compose up -d --build

#1 [internal] load local bake definitions
#1 reading from stdin 553B 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 1.3s

#4 [internal] load .dockerignore
#4 transferring context: 2B done
#4 DONE 0.0s

#5 exporting to docker image format
#5 exporting layers done
#5 exporting manifest sha256:2b357cf9b8c8a8a906bd9a9a362a36c2882e236489fd29a6e1104752967f0d14 0.0s done
#5 exporting config sha256:701e39ee0b95f0483d6059829551e3790e73d67c77138c05afa47e3c99cc286a done
#5 ...

#6 [1/1] FROM docker.io/library/debian:bookworm@sha256:b6507e340c43553136f5078284c8c68d86ec8262b1724dde73c325e8d3dcdeba
#6 resolve docker.io/library/debian:bookworm@sha256:b6507e340c43553136f5078284c8c68d86ec8262b1724dde73c325e8d3dcdeba done
#6 sha256:ebed137c7c18cb1906fb8314eabc10611ddf49a281f8c1b5eab987a7137f749f 48.49MB / 48.49MB 2.8s done
#6 DONE 2.8s

#5 exporting to docker image format
#5 sending tarball
#5 ...

#7 importing to docker
#7 loading layer 175a19836175 491.52kB / 48.49MB
#7 loading layer 175a19836175 25.56MB / 48.49MB 2.1s
#7 loading layer 175a19836175 47.68MB / 48.49MB 4.3s
#7 loading layer 175a19836175 48.49MB / 48.49MB 4.8s done
#7 DONE 4.8s

#5 exporting to docker image format
#5 sending tarball 5.2s done
#5 DONE 8.1s

#8 resolving provenance for metadata file
#8 DONE 0.0s
[+] Running 3/3
 ✔ hello-world-hello-world              Built                                                                                                                                                               0.0s
 ✔ Network hello-world_default          Created                                                                                                                                                             0.1s
 ✔ Container hello-world-hello-world-1  Started

Compose Version

Docker Compose version v2.39.1

Docker Environment

Client: Docker Engine - Community
 Version:    28.3.2
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.25.0
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.39.1
    Path:     /home/user/.docker/cli-plugins/docker-compose

Server:
 Containers: 26
  Running: 17
  Paused: 0
  Stopped: 9
 Images: 118
 Server Version: 28.3.2
 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: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 CDI spec directories:
  /etc/cdi
  /var/run/cdi
 Swarm: inactive
 Runtimes: nvidia runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 05044ec0a9a75232cad458027ca83437aae3f4da
 runc version: v1.2.5-0-g59923ef
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.6.87.2-microsoft-standard-WSL2
 Operating System: Ubuntu 22.04.5 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.757GiB
 Name: DESKTOP
 ID: 0e6a9e8e-5b9e-4049-baf9-1efaf7f3d139
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  ::1/128
  127.0.0.0/8
 Live Restore Enabled: false

Anything else?

$ hostnamectl

hostnamectl
 Static hostname: DESKTOP
       Icon name: computer-container
         Chassis: container
      Machine ID: <machine-id>
         Boot ID: <boot-id>
  Virtualization: wsl
Operating System: Ubuntu 22.04.5 LTS
          Kernel: Linux 6.6.87.2-microsoft-standard-WSL2
    Architecture: x86-64

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions