mirror of https://github.com/docker/compose.git
Reject compose file not setting service image
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
4700fed836
commit
242216cab1
|
@ -40,6 +40,7 @@ func (c *FargateCompatibilityChecker) CheckPortsPublished(p *types.ServicePortCo
|
||||||
}
|
}
|
||||||
if p.Published != p.Target {
|
if p.Published != p.Target {
|
||||||
c.Error("published port can't be set to a distinct value than container port")
|
c.Error("published port can't be set to a distinct value than container port")
|
||||||
|
p.Published = p.Target
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,10 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func Convert(project *types.Project, service types.ServiceConfig) (*ecs.TaskDefinition, error) {
|
func Convert(project *types.Project, service types.ServiceConfig) (*ecs.TaskDefinition, error) {
|
||||||
|
if service.Image == "" {
|
||||||
|
return nil, fmt.Errorf("service %s doesn't define a Docker image to run", service.Name)
|
||||||
|
}
|
||||||
|
|
||||||
cpu, mem, err := toLimits(service)
|
cpu, mem, err := toLimits(service)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in New Issue