mirror of
https://github.com/docker/compose.git
synced 2025-07-26 07:04:32 +02:00
reject compose file using secrets|configs.driver or template_driver
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
43c3f54598
commit
426377a4c9
@ -20,6 +20,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
@ -804,6 +805,13 @@ func buildContainerConfigMounts(p types.Project, s types.ServiceConfig) ([]mount
|
|||||||
return nil, fmt.Errorf("unsupported external config %s", definedConfig.Name)
|
return nil, fmt.Errorf("unsupported external config %s", definedConfig.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if definedConfig.Driver != "" {
|
||||||
|
return nil, errors.New("Docker Compose does not support configs.*.driver")
|
||||||
|
}
|
||||||
|
if definedConfig.TemplateDriver != "" {
|
||||||
|
return nil, errors.New("Docker Compose does not support configs.*.template_driver")
|
||||||
|
}
|
||||||
|
|
||||||
bindMount, err := buildMount(p, types.ServiceVolumeConfig{
|
bindMount, err := buildMount(p, types.ServiceVolumeConfig{
|
||||||
Type: types.VolumeTypeBind,
|
Type: types.VolumeTypeBind,
|
||||||
Source: definedConfig.File,
|
Source: definedConfig.File,
|
||||||
@ -843,6 +851,13 @@ func buildContainerSecretMounts(p types.Project, s types.ServiceConfig) ([]mount
|
|||||||
return nil, fmt.Errorf("unsupported external secret %s", definedSecret.Name)
|
return nil, fmt.Errorf("unsupported external secret %s", definedSecret.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if definedSecret.Driver != "" {
|
||||||
|
return nil, errors.New("Docker Compose does not support secrets.*.driver")
|
||||||
|
}
|
||||||
|
if definedSecret.TemplateDriver != "" {
|
||||||
|
return nil, errors.New("Docker Compose does not support secrets.*.template_driver")
|
||||||
|
}
|
||||||
|
|
||||||
if definedSecret.Environment != "" {
|
if definedSecret.Environment != "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user