Merge pull request #609 from surajnarwade/validate_dockerfilepath

Validate dockerfilepath in buildconfig
This commit is contained in:
Charlie Drage authored and GitHub committed 2017-05-31 13:13:04 -04:00
commit 1f0cf0b2e1
3 files changed
+15

No files matched your search

+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 {