summaryrefslogtreecommitdiff
path: root/vendor/github.com/containers/buildah/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/containers/buildah/config.go')
-rw-r--r--vendor/github.com/containers/buildah/config.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/github.com/containers/buildah/config.go b/vendor/github.com/containers/buildah/config.go
index 8665e4143..0292ea43c 100644
--- a/vendor/github.com/containers/buildah/config.go
+++ b/vendor/github.com/containers/buildah/config.go
@@ -422,6 +422,16 @@ func (b *Builder) Volumes() []string {
return nil
}
+// CheckVolume returns True if the location exists in the image's list of locations
+// which should be mounted from outside of the container when a container
+// based on an image built from this container is run
+
+func (b *Builder) CheckVolume(v string) bool {
+ _, OCIv1Volume := b.OCIv1.Config.Volumes[v]
+ _, DockerVolume := b.Docker.Config.Volumes[v]
+ return OCIv1Volume || DockerVolume
+}
+
// AddVolume adds a location to the image's list of locations which should be
// mounted from outside of the container when a container based on an image
// built from this container is run.