aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vendor.conf2
-rw-r--r--vendor/github.com/containers/buildah/imagebuildah/build.go17
2 files changed, 17 insertions, 2 deletions
diff --git a/vendor.conf b/vendor.conf
index 4a62c6be7..ce3ca9d44 100644
--- a/vendor.conf
+++ b/vendor.conf
@@ -91,7 +91,7 @@ k8s.io/apimachinery kubernetes-1.10.13-beta.0 https://github.com/kubernetes/apim
k8s.io/client-go kubernetes-1.10.13-beta.0 https://github.com/kubernetes/client-go
github.com/mrunalp/fileutils 7d4729fb36185a7c1719923406c9d40e54fb93c7
github.com/varlink/go 92687ab4eb68d99e43b1f5b93477ad76bb54f811
-github.com/containers/buildah e7ca330f923701dba8859f5c014d0a9a3f7f0a49
+github.com/containers/buildah 2406e4acaa00938b8324a0ef3caadbe5668ec896
# TODO: Gotty has not been updated since 2012. Can we find replacement?
github.com/Nvveen/Gotty cd527374f1e5bff4938207604a14f2e38a9cf512
# do not go beyond the below commit as the next one requires a more recent
diff --git a/vendor/github.com/containers/buildah/imagebuildah/build.go b/vendor/github.com/containers/buildah/imagebuildah/build.go
index 217bcfc79..56ab7aa57 100644
--- a/vendor/github.com/containers/buildah/imagebuildah/build.go
+++ b/vendor/github.com/containers/buildah/imagebuildah/build.go
@@ -1311,13 +1311,17 @@ func (b *Executor) Build(ctx context.Context, stages imagebuilder.Stages) (strin
// Check if we have a one line Dockerfile making layers irrelevant
// or the user told us to ignore layers.
- ignoreLayers := (len(stages) < 2 && len(stages[0].Node.Children) < 2) || (!b.layers && !b.noCache)
+ singleLineDockerfile := (len(stages) < 2 && len(stages[0].Node.Children) < 1)
+ ignoreLayers := singleLineDockerfile || !b.layers && !b.noCache
if ignoreLayers {
imgID, ref, err := stageExecutor.Commit(ctx, stages[len(stages)-1].Builder, "")
if err != nil {
return "", nil, err
}
+ if singleLineDockerfile {
+ b.log("COMMIT %s", ref)
+ }
imageID = imgID
imageRef = ref
}
@@ -1527,6 +1531,17 @@ func (b *Executor) deleteSuccessfulIntermediateCtrs() error {
return lastErr
}
+func (b *Executor) EnsureContainerPath(path string) error {
+ _, err := os.Stat(filepath.Join(b.mountPoint, path))
+ if err != nil && os.IsNotExist(err) {
+ err = os.MkdirAll(filepath.Join(b.mountPoint, path), 0755)
+ }
+ if err != nil {
+ return errors.Wrapf(err, "error ensuring container path %q", path)
+ }
+ return nil
+}
+
// preprocessDockerfileContents runs CPP(1) in preprocess-only mode on the input
// dockerfile content and will use ctxDir as the base include path.
//