@@ -32,15 +32,19 @@ const (
3232 waitForHealthyInterval = 1 * time .Second
3333)
3434
35- var DisableANSIComposeEnv = environment .WithElasticPackagePrefix ("COMPOSE_DISABLE_ANSI" )
35+ var (
36+ DisableANSIComposeEnv = environment .WithElasticPackagePrefix ("COMPOSE_DISABLE_ANSI" )
37+ DisablePullProgressInformationEnv = environment .WithElasticPackagePrefix ("COMPOSE_DISABLE_PULL_PROGRESS_INFORMATION" )
38+ )
3639
3740// Project represents a Docker Compose project.
3841type Project struct {
3942 name string
4043 composeFilePaths []string
4144
42- dockerComposeV1 bool
43- disableANSI bool
45+ dockerComposeV1 bool
46+ disableANSI bool
47+ disablePullProgressInformation bool
4448}
4549
4650// Config represents a Docker Compose configuration file.
@@ -193,14 +197,19 @@ func NewProject(name string, paths ...string) (*Project, error) {
193197 c .disableANSI = true
194198 }
195199
200+ v , ok = os .LookupEnv (DisablePullProgressInformationEnv )
201+ if ok && strings .ToLower (v ) != "false" {
202+ c .disablePullProgressInformation = true
203+ }
204+
196205 return & c , nil
197206}
198207
199208// Up brings up a Docker Compose project.
200209func (p * Project ) Up (opts CommandOptions ) error {
201210 args := p .baseArgs ()
202211 args = append (args , "up" )
203- if p .disableANSI {
212+ if p .disablePullProgressInformation {
204213 args = append (args , "--quiet-pull" )
205214 }
206215 args = append (args , opts .ExtraArgs ... )
@@ -278,6 +287,9 @@ func (p *Project) Config(opts CommandOptions) (*Config, error) {
278287func (p * Project ) Pull (opts CommandOptions ) error {
279288 args := p .baseArgs ()
280289 args = append (args , "pull" )
290+ if p .disablePullProgressInformation {
291+ args = append (args , "--quiet" )
292+ }
281293 args = append (args , opts .ExtraArgs ... )
282294 args = append (args , opts .Services ... )
283295
0 commit comments