Merge pull request #609 from surajnarwade/validate_dockerfilepath

Validate dockerfilepath in buildconfig
This commit is contained in:
Charlie Drage
2017-05-31 13:13:04 -04:00
committed by GitHub
3 changed files with 15 additions and 0 deletions
+5
View File
@@ -329,6 +329,11 @@ func (c *Compose) LoadFile(files []string) (kobject.KomposeObject, error) {
envs := loadEnvVars(composeServiceConfig.Environment)
serviceConfig.Environment = envs
//Validate dockerfile path
if filepath.IsAbs(serviceConfig.Dockerfile) {
log.Fatalf("%q defined in service %q is an absolute path, it must be a relative path.", serviceConfig.Dockerfile, name)
}
// load ports
ports, err := loadPorts(composeServiceConfig.Ports)
if err != nil {