summaryrefslogtreecommitdiff
path: root/vendor/github.com/projectatomic/buildah/pkg
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-06-27 08:55:20 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-06-27 15:16:02 +0000
commite1b47c15076680d318aa6fd0cb650ad89b471022 (patch)
tree4bf24b82c99533645484ce4ea57f75914f73c053 /vendor/github.com/projectatomic/buildah/pkg
parentf6c0fc1aa854ae5ce73d57ecb09d47c0d4dd2cc3 (diff)
downloadpodman-e1b47c15076680d318aa6fd0cb650ad89b471022.tar.gz
podman-e1b47c15076680d318aa6fd0cb650ad89b471022.tar.bz2
podman-e1b47c15076680d318aa6fd0cb650ad89b471022.zip
Vendor in latest buildah
Signed-off-by: baude <bbaude@redhat.com> Closes: #1007 Approved by: baude
Diffstat (limited to 'vendor/github.com/projectatomic/buildah/pkg')
-rw-r--r--vendor/github.com/projectatomic/buildah/pkg/cli/common.go4
-rw-r--r--vendor/github.com/projectatomic/buildah/pkg/parse/parse.go21
2 files changed, 25 insertions, 0 deletions
diff --git a/vendor/github.com/projectatomic/buildah/pkg/cli/common.go b/vendor/github.com/projectatomic/buildah/pkg/cli/common.go
index 4a5deafca..b46e1b491 100644
--- a/vendor/github.com/projectatomic/buildah/pkg/cli/common.go
+++ b/vendor/github.com/projectatomic/buildah/pkg/cli/common.go
@@ -119,6 +119,10 @@ var (
Name: "iidfile",
Usage: "`file` to write the image ID to",
},
+ cli.StringFlag{
+ Name: "isolation",
+ Usage: "`type` of process isolation to use",
+ },
cli.StringSliceFlag{
Name: "label",
Usage: "Set metadata for an image (default [])",
diff --git a/vendor/github.com/projectatomic/buildah/pkg/parse/parse.go b/vendor/github.com/projectatomic/buildah/pkg/parse/parse.go
index c6bd4665e..26831c7a2 100644
--- a/vendor/github.com/projectatomic/buildah/pkg/parse/parse.go
+++ b/vendor/github.com/projectatomic/buildah/pkg/parse/parse.go
@@ -294,6 +294,7 @@ func SystemContextFromOptions(c *cli.Context) (*types.SystemContext, error) {
if c.GlobalIsSet("registries-conf-dir") {
ctx.RegistriesDirPath = c.GlobalString("registries-conf-dir")
}
+ ctx.DockerRegistryUserAgent = fmt.Sprintf("Buildah/%s", buildah.Version)
return ctx, nil
}
@@ -529,3 +530,23 @@ func NamespaceOptions(c *cli.Context) (namespaceOptions buildah.NamespaceOptions
}
return options, policy, nil
}
+
+func defaultIsolation() buildah.Isolation {
+ isolation := os.Getenv("BUILDAH_ISOLATION")
+ if strings.HasPrefix(strings.ToLower(isolation), "oci") {
+ return buildah.IsolationOCI
+ }
+ return buildah.IsolationDefault
+}
+
+// IsolationOption parses the --isolation flag.
+func IsolationOption(c *cli.Context) (buildah.Isolation, error) {
+ if c.String("isolation") != "" {
+ if strings.HasPrefix(strings.ToLower(c.String("isolation")), "oci") {
+ return buildah.IsolationOCI, nil
+ } else {
+ return buildah.IsolationDefault, errors.Errorf("unrecognized isolation type %q", c.String("isolation"))
+ }
+ }
+ return defaultIsolation(), nil
+}