Skip to content

Commit d10a179

Browse files
gloursndeloof
authored andcommitted
add support of QuietOption to create command
Signed-off-by: Guillaume Lours <[email protected]>
1 parent 94246f3 commit d10a179

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

cmd/compose/create.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ func createCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service
7575
flags.BoolVar(&opts.Build, "build", false, "Build images before starting containers")
7676
flags.BoolVar(&opts.noBuild, "no-build", false, "Don't build an image, even if it's policy")
7777
flags.StringVar(&opts.Pull, "pull", "policy", `Pull image before running ("always"|"missing"|"never"|"build")`)
78+
flags.BoolVar(&opts.quietPull, "quiet-pull", false, "Pull without printing progress information")
7879
flags.BoolVar(&opts.forceRecreate, "force-recreate", false, "Recreate containers even if their configuration and image haven't changed")
7980
flags.BoolVar(&opts.noRecreate, "no-recreate", false, "If containers already exist, don't recreate them. Incompatible with --force-recreate.")
8081
flags.BoolVar(&opts.removeOrphans, "remove-orphans", false, "Remove containers for services not defined in the Compose file")
@@ -105,7 +106,7 @@ func runCreate(ctx context.Context, _ command.Cli, backend api.Service, createOp
105106
RecreateDependencies: createOpts.dependenciesRecreateStrategy(),
106107
Inherit: !createOpts.noInherit,
107108
Timeout: createOpts.GetTimeout(),
108-
QuietPull: false,
109+
QuietPull: createOpts.quietPull,
109110
})
110111
}
111112

docs/reference/compose_create.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Creates containers for a service
1313
| `--no-build` | | | Don't build an image, even if it's policy |
1414
| `--no-recreate` | | | If containers already exist, don't recreate them. Incompatible with --force-recreate. |
1515
| `--pull` | `string` | `policy` | Pull image before running ("always"\|"missing"\|"never"\|"build") |
16+
| `--quiet-pull` | | | Pull without printing progress information |
1617
| `--remove-orphans` | | | Remove containers for services not defined in the Compose file |
1718
| `--scale` | `stringArray` | | Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present. |
1819

docs/reference/docker_compose_create.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ options:
5757
experimentalcli: false
5858
kubernetes: false
5959
swarm: false
60+
- option: quiet-pull
61+
value_type: bool
62+
default_value: "false"
63+
description: Pull without printing progress information
64+
deprecated: false
65+
hidden: false
66+
experimental: false
67+
experimentalcli: false
68+
kubernetes: false
69+
swarm: false
6070
- option: remove-orphans
6171
value_type: bool
6272
default_value: "false"

0 commit comments

Comments
 (0)