forked from LaconicNetwork/kompose
Merge pull request #609 from surajnarwade/validate_dockerfilepath
Validate dockerfilepath in buildconfig
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user