compose: [BUG] Overlapping print rows while building
Description
When docker-compose is building images the printout seems to be confused about which rows to use. It prints out, e.g., both a Dockerfile instruction, like COPY, as well as the current container status on the same row. This results in a constant switching between what is written.
Steps To Reproduce
- Enter a directory with a
docker-compose.ymlfile - Run
docker-compose build --no-cache
Compose Version
`docker compose version`:
`Docker Compose version 2.31.0`
`docker-compose version`:
`Docker Compose version 2.31.0`
Docker Environment
Client:
Version: 27.3.1
Context: default
Debug Mode: false
Plugins:
compose: Docker Compose (Docker Inc.)
Version: 2.31.0
Path: /usr/lib/docker/cli-plugins/docker-compose
Server:
Containers: 4
Running: 3
Paused: 0
Stopped: 1
Images: 978
Server Version: 27.3.1
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: true
Native Overlay Diff: false
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
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 207ad711eabd375a01713109a8a197d197ff6542.m
runc version:
init version: de40ad0
Security Options:
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.6.63-1-MANJARO
Operating System: Manjaro Linux
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 13.34GiB
Name: Saturn
ID: e1c30eb4-300f-4d4d-97d4-2cdbd78aeca8
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Anything else?
I don’t really know what caused it to happen. I know the steps to reproduce aren’t satisfactory but I’m not sure what else to write. Any insight regarding the printout is appreciated.
Here’s an image as well as a video of the building process.
https://github.com/user-attachments/assets/4a0d560c-3ce1-4192-ae2d-533789d41b45
Running with
--progress plain works of course but that’s sidestepping the issue.
I tried reinstalling. Neither different terminals nor tty changed anything.
P.S. build specifically doesn’t have to be run, anything that would cause that specific progress type to display works.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 27
- Comments: 19 (4 by maintainers)
I made a duplicate issue by accident, here’s a gif I made of the problem though for reference
Fix is in v2.32.3
Just checking - I see this issue is closed but I’m still having this issue on a brand new install. When is the fix for this going to be released?
The issue seems to stem for two writers writing to Stdout and Stderr at the same time.
Interestingly enough, if I run
docker compose build >/dev/nullI get this clean output:And if I run
docker compose build 2>/dev/nullI get another clean output:So the issue seems to be the mixing of two outputs. Since the second output is more than enough, disabling the Stderr output could be a workaround.
OR
~We could just decide to use either Stdout or Stderr for both buildkit and compose output, and not both.~ After testing, I can say that won’t work. We would get the same jitters, only a little cleaner.
Perhaps buildkit output needs to always be two lines above the compose output - that way both would get their own scratch space and not trample each other.
Docker compose version
v2.32.1still having this problemJust received an email recommending upgrading to Docker Desktop 4.37.2 (179585) with Compose: v2.31.0-desktop.2 and the flickering issue is still happening.
I also noticed this issue. Seems we need to disable compose progress UI while buildkit is using the console to render build state
Downgraded to 4.36 and problem still persists. Builds are super slow and unstable.
Disabling buildkit fixes the flicker at the cost of time but something is def off. Builds that took a min now go into 5+ minutes.
☝️ make sure to remove it again once a new version of Desktop is available, otherwise that “override” continues to take priority, so you won’t get updated versions that ship with docker desktop 😅
@Gavriel94 if you download the newer version of Compose to
~/.docker/cli-plugins/docker-compose(your path might vary) thendocker<space>composewill use it ✨Yeah something is cooked. Ever since it started flickering the builds take much longer.
In case useful for those looking into this; we had some pull requests in docker/cli recently to fix a similar issue for
docker statson Windows; here’s the pull requests that helped mitigate those, in case a similar patch would help for this case;Update: I works fine after downgrading to earlier versions of docker-compose, for example 2.30.3.