From fcb9d66987b5c50ac4e0c7d68181354eb294675f Mon Sep 17 00:00:00 2001 From: Francisco Souza Date: Sun, 11 Feb 2018 13:12:31 -0500 Subject: [PATCH] tar: use absolute path as srcPath when generating the tar stream --- tar.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tar.go b/tar.go index be4dfa57..9716a771 100644 --- a/tar.go +++ b/tar.go @@ -18,6 +18,11 @@ import ( ) func createTarStream(srcPath, dockerfilePath string) (io.ReadCloser, error) { + srcPath, err := filepath.Abs(srcPath) + if err != nil { + return nil, err + } + excludes, err := parseDockerignore(srcPath) if err != nil { return nil, err