From e83d940a3c9eaa064a91e1a7dc3b276bd8d3c548 Mon Sep 17 00:00:00 2001 From: Guillaume Lours Date: Wed, 27 Jul 2022 11:25:53 +0200 Subject: [PATCH] add pull & build config to project before create add pull flag to create and up documentation Signed-off-by: Guillaume Lours --- cmd/compose/create.go | 1 + docs/reference/compose_create.md | 1 + docs/reference/compose_up.md | 1 + docs/reference/docker_compose_create.yaml | 10 ++++++++++ docs/reference/docker_compose_up.yaml | 10 ++++++++++ 5 files changed, 23 insertions(+) diff --git a/cmd/compose/create.go b/cmd/compose/create.go index f697f91f4..717c28b31 100644 --- a/cmd/compose/create.go +++ b/cmd/compose/create.go @@ -57,6 +57,7 @@ func createCommand(p *projectOptions, backend api.Service) *cobra.Command { return nil }), RunE: p.WithProject(func(ctx context.Context, project *types.Project) error { + opts.Apply(project) return backend.Create(ctx, project, api.CreateOptions{ RemoveOrphans: opts.removeOrphans, IgnoreOrphans: opts.ignoreOrphans, diff --git a/docs/reference/compose_create.md b/docs/reference/compose_create.md index 00123ba78..843d4235b 100644 --- a/docs/reference/compose_create.md +++ b/docs/reference/compose_create.md @@ -11,6 +11,7 @@ Creates containers for a service. | `--force-recreate` | | | Recreate containers even if their configuration and image haven't changed. | | `--no-build` | | | Don't build an image, even if it's missing. | | `--no-recreate` | | | If containers already exist, don't recreate them. Incompatible with --force-recreate. | +| `--pull` | `string` | `missing` | Pull image before running ("always"\|"missing"\|"never") | diff --git a/docs/reference/compose_up.md b/docs/reference/compose_up.md index 1a110f3f9..2a883c530 100644 --- a/docs/reference/compose_up.md +++ b/docs/reference/compose_up.md @@ -21,6 +21,7 @@ Create and start containers | `--no-log-prefix` | | | Don't print prefix in logs. | | `--no-recreate` | | | If containers already exist, don't recreate them. Incompatible with --force-recreate. | | `--no-start` | | | Don't start the services after creating them. | +| `--pull` | `string` | `missing` | Pull image before running ("always"\|"missing"\|"never") | | `--quiet-pull` | | | Pull without printing progress information. | | `--remove-orphans` | | | Remove containers for services not defined in the Compose file. | | `-V`, `--renew-anon-volumes` | | | Recreate anonymous volumes instead of retrieving data from the previous containers. | diff --git a/docs/reference/docker_compose_create.yaml b/docs/reference/docker_compose_create.yaml index 35d76a3d6..176e695c1 100644 --- a/docs/reference/docker_compose_create.yaml +++ b/docs/reference/docker_compose_create.yaml @@ -47,6 +47,16 @@ options: experimentalcli: false kubernetes: false swarm: false + - option: pull + value_type: string + default_value: missing + description: Pull image before running ("always"|"missing"|"never") + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false deprecated: false experimental: false experimentalcli: false diff --git a/docs/reference/docker_compose_up.yaml b/docs/reference/docker_compose_up.yaml index ef41c951f..9ab0681ef 100644 --- a/docs/reference/docker_compose_up.yaml +++ b/docs/reference/docker_compose_up.yaml @@ -165,6 +165,16 @@ options: experimentalcli: false kubernetes: false swarm: false + - option: pull + value_type: string + default_value: missing + description: Pull image before running ("always"|"missing"|"never") + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false - option: quiet-pull value_type: bool default_value: "false"