summaryrefslogtreecommitdiff
path: root/vendor/github.com/projectatomic/buildah/imagebuildah/build.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/projectatomic/buildah/imagebuildah/build.go')
-rw-r--r--vendor/github.com/projectatomic/buildah/imagebuildah/build.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/github.com/projectatomic/buildah/imagebuildah/build.go b/vendor/github.com/projectatomic/buildah/imagebuildah/build.go
index 42e51878e..c7182e15e 100644
--- a/vendor/github.com/projectatomic/buildah/imagebuildah/build.go
+++ b/vendor/github.com/projectatomic/buildah/imagebuildah/build.go
@@ -1203,8 +1203,9 @@ func BuildDockerfiles(ctx context.Context, store storage.Store, options BuildOpt
}
data = resp.Body
} else {
- if !filepath.IsAbs(dfile) {
- logrus.Debugf("resolving local Dockerfile %q", dfile)
+ // If the Dockerfile isn't found try prepending the
+ // context directory to it.
+ if _, err := os.Stat(dfile); os.IsNotExist(err) {
dfile = filepath.Join(options.ContextDirectory, dfile)
}
logrus.Debugf("reading local Dockerfile %q", dfile)