@@ -31,15 +31,19 @@ const (
3131 waitForHealthyInterval = 1 * time .Second
3232)
3333
34- var DisableANSIComposeEnv = environment .WithElasticPackagePrefix ("COMPOSE_DISABLE_ANSI" )
34+ var (
35+ DisableANSIComposeEnv = environment .WithElasticPackagePrefix ("COMPOSE_DISABLE_ANSI" )
36+ DisablePullProgressInformationEnv = environment .WithElasticPackagePrefix ("COMPOSE_DISABLE_PULL_PROGRESS_INFORMATION" )
37+ )
3538
3639// Project represents a Docker Compose project.
3740type Project struct {
3841 name string
3942 composeFilePaths []string
4043
41- dockerComposeV1 bool
42- disableANSI bool
44+ dockerComposeV1 bool
45+ disableANSI bool
46+ disablePullProgressInformation bool
4347}
4448
4549// Config represents a Docker Compose configuration file.
@@ -192,14 +196,19 @@ func NewProject(name string, paths ...string) (*Project, error) {
192196 c .disableANSI = true
193197 }
194198
199+ v , ok = os .LookupEnv (DisablePullProgressInformationEnv )
200+ if ok && strings .ToLower (v ) != "false" {
201+ c .disablePullProgressInformation = true
202+ }
203+
195204 return & c , nil
196205}
197206
198207// Up brings up a Docker Compose project.
199208func (p * Project ) Up (opts CommandOptions ) error {
200209 args := p .baseArgs ()
201210 args = append (args , "up" )
202- if p .disableANSI {
211+ if p .disablePullProgressInformation {
203212 args = append (args , "--quiet-pull" )
204213 }
205214 args = append (args , opts .ExtraArgs ... )
@@ -277,7 +286,7 @@ func (p *Project) Config(opts CommandOptions) (*Config, error) {
277286func (p * Project ) Pull (opts CommandOptions ) error {
278287 args := p .baseArgs ()
279288 args = append (args , "pull" )
280- if p .disableANSI {
289+ if p .disablePullProgressInformation {
281290 args = append (args , "--quiet" )
282291 }
283292 args = append (args , opts .ExtraArgs ... )
0 commit comments