Skip to content

Commit 4cebef1

Browse files
authored
Merge pull request docker#9423 from quite/clarify-workdir
Clarify what default work dir is when multiple compose files
2 parents 028cb4d + d89c143 commit 4cebef1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

cmd/compose/compose.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ func (o *projectOptions) addProjectFlags(f *pflag.FlagSet) {
129129
f.StringVarP(&o.ProjectName, "project-name", "p", "", "Project name")
130130
f.StringArrayVarP(&o.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
131131
f.StringVar(&o.EnvFile, "env-file", "", "Specify an alternate environment file.")
132-
f.StringVar(&o.ProjectDir, "project-directory", "", "Specify an alternate working directory\n(default: the path of the Compose file)")
133-
f.StringVar(&o.WorkDir, "workdir", "", "DEPRECATED! USE --project-directory INSTEAD.\nSpecify an alternate working directory\n(default: the path of the Compose file)")
132+
f.StringVar(&o.ProjectDir, "project-directory", "", "Specify an alternate working directory\n(default: the path of the, first specified, Compose file)")
133+
f.StringVar(&o.WorkDir, "workdir", "", "DEPRECATED! USE --project-directory INSTEAD.\nSpecify an alternate working directory\n(default: the path of the, first specified, Compose file)")
134134
f.BoolVar(&o.Compatibility, "compatibility", false, "Run compose in backward compatibility mode")
135135
_ = f.MarkHidden("workdir")
136136
}

docs/reference/compose.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Docker Compose
4444
| `-f`, `--file` | `stringArray` | | Compose configuration files |
4545
| `--profile` | `stringArray` | | Specify a profile to enable |
4646
| `--project-directory` | `string` | | Specify an alternate working directory
47-
(default: the path of the Compose file) |
47+
(default: the path of the, first specified, Compose file) |
4848
| `-p`, `--project-name` | `string` | | Project name |
4949

5050

docs/reference/docker_compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ options:
222222
value_type: string
223223
description: |-
224224
Specify an alternate working directory
225-
(default: the path of the Compose file)
225+
(default: the path of the, first specified, Compose file)
226226
deprecated: false
227227
hidden: false
228228
experimental: false
@@ -265,7 +265,7 @@ options:
265265
description: |-
266266
DEPRECATED! USE --project-directory INSTEAD.
267267
Specify an alternate working directory
268-
(default: the path of the Compose file)
268+
(default: the path of the, first specified, Compose file)
269269
deprecated: false
270270
hidden: true
271271
experimental: false

0 commit comments

Comments
 (0)