compose: [BUG] docker compose run --quiet-pull doesn't work

Description

Running docker compose run --quiet-pull .. should avoid printing the container pulling information, but this simply doesn’t work. It still prints the following

[+] Running 2/0
 ⠿ Container my-container-1       Running                                                                                                                                                                  0.0s
 ⠿ Container my-container-2  Created

Before printing the actual container’s run command output.

This messes with scripts that use the run command’s output which is now mixed with container pull information.

Was already reported and re-reported here, but that issue was closed without resolution.

Steps To Reproduce

docker compose run --quiet-pull wdio npm run wdio

Compose Version

Docker Compose version v2.15.1

Docker Environment

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Docker Buildx (Docker Inc., v0.8.2-docker)
  compose: Docker Compose (Docker Inc., v2.15.1)
  scan: Docker Scan (Docker Inc., v0.17.0)

Server:
 Containers: 12
  Running: 2
  Paused: 0
  Stopped: 10
 Images: 79
 Server Version: 20.10.17
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  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 logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 0197261a30bf81f1ee8e6a4dd2dea0ef95d67ccb
 runc version: v1.1.3-0-g6724737
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.19.0-43-generic
 Operating System: Ubuntu 22.04.2 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 31.1GiB
 Name: dekker-Precision-5550
 ID: K4C2:DLWX:7ZTL:COE7:5UYL:KUVF:4TTB:5VXC:OHHQ:PXNY:3QBZ:FK2J
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: chrisdekker
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Default Address Pools:
   Base: 10.0.0.0/16, Size: 24

Anything else?

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 5
  • Comments: 16 (6 by maintainers)

Most upvoted comments

While the OP seems to actually have a different problem, I do get the pull logs on gitlab even with --quite-pull =>

$ docker-compose -f docker-compose.test.yml -f docker-compose.yml run --quiet-pull php-test # collapsed multi-line command
 db Pulling 
 df20fa9351a1 Pulling fs layer 
 600cd4e17445 Pulling fs layer 
 04c8eedc9a76 Pulling fs layer 
 2704c561b4e3 Pulling fs layer 
 db082802a6cb Pulling fs layer 
 4d2a93e8110b Pulling fs layer 
 ae8ba07f5a37 Pulling fs layer 
 3cfbb9fe5e84 Pulling fs layer 
 005b6bf61c53 Pulling fs layer 
 4d2a93e8110b Waiting 
 ae8ba07f5a37 Waiting 
 3cfbb9fe5e84 Waiting 
 005b6bf61c53 Waiting 
 2704c561b4e3 Waiting 
 db082802a6cb Waiting 
 04c8eedc9a76 Downloading [==================================================>]     115B/115B
 04c8eedc9a76 Download complete 
 600cd4e17445 Downloading [==============================>                    ]     758B/1.248kB
 600cd4e17445 Downloading [==================================================>]  1.248kB/1.248kB
 600cd4e17445 Verifying Checksum 
 600cd4e17445 Download complete 
 df20fa9351a1 Downloading [>                                                  ]  28.75kB/2.798MB
 df20fa9351a1 Verifying Checksum 
 df20fa9351a1 Download complete 
 df20fa9351a1 Extracting [>                                                  ]  32.77kB/2.798MB
 df20fa9351a1 Extracting [=================================>                 ]  1.901MB/2.798MB
 df20fa9351a1 Extracting [==================================================>]  2.798MB/2.798MB
 df20fa9351a1 Pull complete 
 600cd4e17445 Extracting [==================================================>]  1.248kB/1.248kB
 600cd4e17445 Extracting [==================================================>]  1.248kB/1.248kB
 600cd4e17445 Pull complete 
 04c8eedc9a76 Extracting [==================================================>]     115B/115B
 04c8eedc9a76 Extracting [==================================================>]     115B/115B
 db082802a6cb Downloading [=====>                                             ]     758B/7.573kB
 db082802a6cb Downloading [==================================================>]  7.573kB/7.573kB
 db082802a6cb Download complete 
 2704c561b4e3 Downloading [>                                                  ]    539kB/57.58MB
 4d2a93e8110b Downloading [==================================================>]     128B/128B
 4d2a93e8110b Verifying Checksum 
 4d2a93e8110b Download complete 
 04c8eedc9a76 Pull complete 
 2704c561b4e3 Downloading [==========>                                        ]  11.84MB/57.58MB
 2704c561b4e3 Downloading [===================>                               ]  22.59MB/57.58MB
 ae8ba07f5a37 Downloading [==================================================>]     164B/164B
 ae8ba07f5a37 Verifying Checksum 
 ae8ba07f5a37 Download complete 
 2704c561b4e3 Downloading [============================>                      ]  33.28MB/57.58MB
 3cfbb9fe5e84 Downloading [========>                                          ]     759B/4.262kB
 3cfbb9fe5e84 Downloading [==================================================>]  4.262kB/4.262kB
 3cfbb9fe5e84 Verifying Checksum 
 3cfbb9fe5e84 Download complete 
 2704c561b4e3 Downloading [======================================>            ]  44.03MB/57.58MB
 2704c561b4e3 Downloading [===============================================>   ]  55.25MB/57.58MB
 2704c561b4e3 Verifying Checksum 
 2704c561b4e3 Download complete 
 2704c561b4e3 Extracting [>                                                  ]  557.1kB/57.58MB
 005b6bf61c53 Downloading [==================================================>]     121B/121B
 005b6bf61c53 Verifying Checksum 
 005b6bf61c53 Download complete 
 2704c561b4e3 Extracting [==>                                                ]  2.785MB/57.58MB
 2704c561b4e3 Extracting [======>                                            ]  7.242MB/57.58MB
 2704c561b4e3 Extracting [==========>                                        ]  12.26MB/57.58MB
 2704c561b4e3 Extracting [==============>                                    ]  16.15MB/57.58MB
 2704c561b4e3 Extracting [================>                                  ]  18.94MB/57.58MB
 2704c561b4e3 Extracting [==================>                                ]  21.73MB/57.58MB
 2704c561b4e3 Extracting [=====================>                             ]  25.07MB/57.58MB
 2704c561b4e3 Extracting [========================>                          ]  27.85MB/57.58MB
 2704c561b4e3 Extracting [===========================>                       ]   31.2MB/57.58MB
 2704c561b4e3 Extracting [=============================>                     ]  34.54MB/57.58MB
 2704c561b4e3 Extracting [================================>                  ]  37.88MB/57.58MB
 2704c561b4e3 Extracting [====================================>              ]  42.34MB/57.58MB
 2704c561b4e3 Extracting [=====================================>             ]  43.45MB/57.58MB
 2704c561b4e3 Extracting [========================================>          ]  46.24MB/57.58MB
 2704c561b4e3 Extracting [==========================================>        ]  49.02MB/57.58MB
 2704c561b4e3 Extracting [============================================>      ]  51.81MB/57.58MB
 2704c561b4e3 Extracting [================================================>  ]  55.71MB/57.58MB
 2704c561b4e3 Extracting [==================================================>]  57.58MB/57.58MB
 2704c561b4e3 Pull complete 
 db082802a6cb Extracting [==================================================>]  7.573kB/7.573kB
 db082802a6cb Extracting [==================================================>]  7.573kB/7.573kB
 db082802a6cb Pull complete 
 4d2a93e8110b Extracting [==================================================>]     128B/128B
 4d2a93e8110b Extracting [==================================================>]     128B/128B
 4d2a93e8110b Pull complete 
 ae8ba07f5a37 Extracting [==================================================>]     164B/164B
 ae8ba07f5a37 Extracting [==================================================>]     164B/164B
 ae8ba07f5a37 Pull complete 
 3cfbb9fe5e84 Extracting [==================================================>]  4.262kB/4.262kB
 3cfbb9fe5e84 Extracting [==================================================>]  4.262kB/4.262kB
 3cfbb9fe5e84 Pull complete 
 005b6bf61c53 Extracting [==================================================>]     121B/121B
 005b6bf61c53 Extracting [==================================================>]     121B/121B
 005b6bf61c53 Pull complete 

compose version:

$ docker-compose version
Docker Compose version v2.18.1

docker:

$ docker version
Client:
 Version:           24.0.2
 API version:       1.41 (downgraded from 1.43)
 Go version:        go1.20.4
 Git commit:        cb74dfc
 Built:             Thu May 25 21:50:49 2023
 OS/Arch:           linux/amd64
 Context:           default
Server: Docker Engine - Community
 Engine:
  Version:          20.10.16
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.10
  Git commit:       f756502
  Built:            Thu May 12 09:19:16 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.6.4
  GitCommit:        212e8b6fa2f44b9c21b2798135fc6fb7c53efc16
 runc:
  Version:          1.1.1
  GitCommit:        v1.1.1-0-g52de29d7
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Im a missing something?

@uuf6429 --quite-pull is available with run command since Compose v2.2.0 @leberknecht @jholm117 can you confirm you still have the issue with recent version of Compose? Can you try to reproduce with this simple sample?

services:
  mongo:
    image: mongo

As you can see everything is displayed as expected on my side with Compose v2.23.1

> bat compose.yaml
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: compose.yaml
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ services:
   2   │   mongo:
   3   │     image: mongo
───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> docker compose run -d --quiet-pull mongo
[+] Creating 1/0
 ✔ Network issue-1074_default  Created                                                                                                                                                                                              0.1s
[+] Running 1/1
 ✔ mongo Pulled                                                                                                                                                                                                                     9.9s
36ea203fb8aedf4dabb59cd10adea785601f20f6d126cc01642bb6e90523c523
> docker compose down --rmi all --remove-orphans
[+] Running 3/3
 ✔ Container issue-1074-mongo-run-d1b508d1ab11  Removed                                                                                                                                                                             0.2s
 ✔ Image mongo:latest                           Removed                                                                                                                                                                             0.4s
 ✔ Network issue-1074_default                   Removed                                                                                                                                                                             0.1s
> docker compose run -d mongo
[+] Creating 1/0
 ✔ Network issue-1074_default  Created                                                                                                                                                                                              0.1s
[+] Running 5/5
 ✔ mongo 4 layers [⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                                                                     9.6s
   ✔ c39807cb848f Download complete                                                                                                                                                                                                 0.3s
   ✔ 0beb4a4f2118 Download complete                                                                                                                                                                                                 0.4s
   ✔ b8d8399c849e Download complete                                                                                                                                                                                                 5.2s
   ✔ 208482253dd3 Download complete                                                                                                                                                                                                 0.4s
2d94a6a8a0a0e56f6e5a05e620e911ec9517d1ef6333318a3c340f0a41db7994