зеркало из https://github.com/docker/compose.git
Restore compose v1 behavior to recreate containers when ran with -V
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Родитель
d445ebba3f
Коммит
a7424435b3
|
@ -117,6 +117,9 @@ func (opts createOptions) recreateStrategy() string {
|
|||
if opts.forceRecreate {
|
||||
return api.RecreateForce
|
||||
}
|
||||
if opts.noInherit {
|
||||
return api.RecreateForce
|
||||
}
|
||||
return api.RecreateDiverged
|
||||
}
|
||||
|
||||
|
|
|
@ -189,6 +189,9 @@ func validateFlags(up *upOptions, create *createOptions) error {
|
|||
if up.Detach && (up.attachDependencies || up.cascadeStop || up.cascadeFail || len(up.attach) > 0 || up.watch) {
|
||||
return fmt.Errorf("--detach cannot be combined with --abort-on-container-exit, --abort-on-container-failure, --attach, --attach-dependencies or --watch")
|
||||
}
|
||||
if create.noInherit && create.noRecreate {
|
||||
return fmt.Errorf("--no-recreate and --renew-anon-volumes are incompatible")
|
||||
}
|
||||
if create.forceRecreate && create.noRecreate {
|
||||
return fmt.Errorf("--force-recreate and --no-recreate are incompatible")
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче