Skip to content

Commit e83d940

Browse files
committed
add pull & build config to project before create
add pull flag to create and up documentation Signed-off-by: Guillaume Lours <[email protected]>
1 parent 9976077 commit e83d940

File tree

5 files changed

+23
-0
lines changed

5 files changed

+23
-0
lines changed

cmd/compose/create.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ func createCommand(p *projectOptions, backend api.Service) *cobra.Command {
5757
return nil
5858
}),
5959
RunE: p.WithProject(func(ctx context.Context, project *types.Project) error {
60+
opts.Apply(project)
6061
return backend.Create(ctx, project, api.CreateOptions{
6162
RemoveOrphans: opts.removeOrphans,
6263
IgnoreOrphans: opts.ignoreOrphans,

docs/reference/compose_create.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Creates containers for a service.
1111
| `--force-recreate` | | | Recreate containers even if their configuration and image haven't changed. |
1212
| `--no-build` | | | Don't build an image, even if it's missing. |
1313
| `--no-recreate` | | | If containers already exist, don't recreate them. Incompatible with --force-recreate. |
14+
| `--pull` | `string` | `missing` | Pull image before running ("always"\|"missing"\|"never") |
1415

1516

1617
<!---MARKER_GEN_END-->

docs/reference/compose_up.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Create and start containers
2121
| `--no-log-prefix` | | | Don't print prefix in logs. |
2222
| `--no-recreate` | | | If containers already exist, don't recreate them. Incompatible with --force-recreate. |
2323
| `--no-start` | | | Don't start the services after creating them. |
24+
| `--pull` | `string` | `missing` | Pull image before running ("always"\|"missing"\|"never") |
2425
| `--quiet-pull` | | | Pull without printing progress information. |
2526
| `--remove-orphans` | | | Remove containers for services not defined in the Compose file. |
2627
| `-V`, `--renew-anon-volumes` | | | Recreate anonymous volumes instead of retrieving data from the previous containers. |

docs/reference/docker_compose_create.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ options:
4747
experimentalcli: false
4848
kubernetes: false
4949
swarm: false
50+
- option: pull
51+
value_type: string
52+
default_value: missing
53+
description: Pull image before running ("always"|"missing"|"never")
54+
deprecated: false
55+
hidden: false
56+
experimental: false
57+
experimentalcli: false
58+
kubernetes: false
59+
swarm: false
5060
deprecated: false
5161
experimental: false
5262
experimentalcli: false

docs/reference/docker_compose_up.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,16 @@ options:
165165
experimentalcli: false
166166
kubernetes: false
167167
swarm: false
168+
- option: pull
169+
value_type: string
170+
default_value: missing
171+
description: Pull image before running ("always"|"missing"|"never")
172+
deprecated: false
173+
hidden: false
174+
experimental: false
175+
experimentalcli: false
176+
kubernetes: false
177+
swarm: false
168178
- option: quiet-pull
169179
value_type: bool
170180
default_value: "false"

0 commit comments

Comments
 (0)