diff --git a/components/engine/runtime/volumes.go b/components/engine/runtime/volumes.go index 0b6f3734e0..40db177174 100644 --- a/components/engine/runtime/volumes.go +++ b/components/engine/runtime/volumes.go @@ -177,12 +177,8 @@ func createVolumes(container *Container) error { if bindMap, exists := binds[volPath]; exists { isBindMount = true srcPath = bindMap.SrcPath - srcAbs, err := filepath.Abs(srcPath) - if err != nil { - return err - } - if srcPath != srcAbs { - return fmt.Errorf("%s should be an absolute path", srcPath) + if !filepath.IsAbs(srcPath) { + return fmt.Errorf("%s must be an absolute path", srcPath) } if strings.ToLower(bindMap.Mode) == "rw" { srcRW = true