mirror of https://github.com/docker/compose.git
Don't panic on bind mount
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
2b8fa9934e
commit
06fd442a53
|
@ -27,9 +27,10 @@ import (
|
|||
|
||||
func (b *ecsAPIService) checkCompatibility(project *types.Project) error {
|
||||
var checker compatibility.Checker = &fargateCompatibilityChecker{
|
||||
compatibility.AllowList{
|
||||
AllowList: compatibility.AllowList{
|
||||
Supported: compatibleComposeAttributes,
|
||||
},
|
||||
projet: project,
|
||||
}
|
||||
compatibility.Check(project, checker)
|
||||
for _, err := range checker.Errors() {
|
||||
|
@ -46,6 +47,7 @@ func (b *ecsAPIService) checkCompatibility(project *types.Project) error {
|
|||
|
||||
type fargateCompatibilityChecker struct {
|
||||
compatibility.AllowList
|
||||
projet *types.Project
|
||||
}
|
||||
|
||||
var compatibleComposeAttributes = []string{
|
||||
|
@ -91,7 +93,6 @@ var compatibleComposeAttributes = []string{
|
|||
"services.user",
|
||||
"services.volumes",
|
||||
"services.volumes.read_only",
|
||||
"services.volumes.source",
|
||||
"services.volumes.target",
|
||||
"services.working_dir",
|
||||
"secrets.external",
|
||||
|
@ -120,6 +121,15 @@ func (c *fargateCompatibilityChecker) CheckPortsPublished(p *types.ServicePortCo
|
|||
}
|
||||
}
|
||||
|
||||
func (c *fargateCompatibilityChecker) CheckVolumesSource(config *types.ServiceVolumeConfig) {
|
||||
if config.Type == types.VolumeTypeBind {
|
||||
c.Incompatible("ECS Fargate does not support bind mounts from host")
|
||||
}
|
||||
if config.Type == types.VolumeTypeTmpfs {
|
||||
c.Incompatible("ECS Fargate does not support tmpfs")
|
||||
}
|
||||
}
|
||||
|
||||
func (c *fargateCompatibilityChecker) CheckCapAdd(service *types.ServiceConfig) {
|
||||
add := []string{}
|
||||
for _, cap := range service.CapAdd {
|
||||
|
|
Loading…
Reference in New Issue