summaryrefslogtreecommitdiff
path: root/vendor/github.com/projectatomic/buildah/pkg
diff options
context:
space:
mode:
authorTomSweeneyRedHat <tsweeney@redhat.com>2018-06-19 10:03:34 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-06-22 14:55:32 +0000
commit89af35175d97cf90e7336d3c817612fafc68dbdb (patch)
tree7468b588dfc47b0e9f173c6b273c732514eb6821 /vendor/github.com/projectatomic/buildah/pkg
parent82a948c04ec068acb9f0d47dc0f9e3bd05b4c90c (diff)
downloadpodman-89af35175d97cf90e7336d3c817612fafc68dbdb.tar.gz
podman-89af35175d97cf90e7336d3c817612fafc68dbdb.tar.bz2
podman-89af35175d97cf90e7336d3c817612fafc68dbdb.zip
Add cap-add and cap-drop to build man page
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Closes: #968 Approved by: mheon
Diffstat (limited to 'vendor/github.com/projectatomic/buildah/pkg')
-rw-r--r--vendor/github.com/projectatomic/buildah/pkg/cli/common.go10
-rw-r--r--vendor/github.com/projectatomic/buildah/pkg/parse/parse.go13
2 files changed, 19 insertions, 4 deletions
diff --git a/vendor/github.com/projectatomic/buildah/pkg/cli/common.go b/vendor/github.com/projectatomic/buildah/pkg/cli/common.go
index 554b30a29..4a5deafca 100644
--- a/vendor/github.com/projectatomic/buildah/pkg/cli/common.go
+++ b/vendor/github.com/projectatomic/buildah/pkg/cli/common.go
@@ -185,7 +185,15 @@ var (
FromAndBudFlags = append(append([]cli.Flag{
cli.StringSliceFlag{
Name: "add-host",
- Usage: "add a custom host-to-IP mapping (host:ip) (default [])",
+ Usage: "add a custom host-to-IP mapping (`host:ip`) (default [])",
+ },
+ cli.StringSliceFlag{
+ Name: "cap-add",
+ Usage: "add the specified capability when running (default [])",
+ },
+ cli.StringSliceFlag{
+ Name: "cap-drop",
+ Usage: "drop the specified capability when running (default [])",
},
cli.StringFlag{
Name: "cgroup-parent",
diff --git a/vendor/github.com/projectatomic/buildah/pkg/parse/parse.go b/vendor/github.com/projectatomic/buildah/pkg/parse/parse.go
index 1a4a1e423..c6bd4665e 100644
--- a/vendor/github.com/projectatomic/buildah/pkg/parse/parse.go
+++ b/vendor/github.com/projectatomic/buildah/pkg/parse/parse.go
@@ -332,7 +332,7 @@ func getDockerAuth(creds string) (*types.DockerAuthConfig, error) {
}, nil
}
-// IDMappingOptions parses the build options from user namespace
+// IDMappingOptions parses the build options related to user namespaces and ID mapping.
func IDMappingOptions(c *cli.Context) (usernsOptions buildah.NamespaceOptions, idmapOptions *buildah.IDMappingOptions, err error) {
user := c.String("userns-uid-map-user")
group := c.String("userns-gid-map-group")
@@ -367,7 +367,14 @@ func IDMappingOptions(c *cli.Context) (usernsOptions buildah.NamespaceOptions, i
}
// Parse the flag's value as one or more triples (if it's even
// been set), and append them.
- idmap, err := parseIDMap(c.StringSlice(option))
+ var spec []string
+ if c.GlobalIsSet(option) {
+ spec = c.GlobalStringSlice(option)
+ }
+ if c.IsSet(option) {
+ spec = c.StringSlice(option)
+ }
+ idmap, err := parseIDMap(spec)
if err != nil {
return nil, err
}
@@ -466,7 +473,7 @@ func parseIDMap(spec []string) (m [][3]uint32, err error) {
return m, nil
}
-// NamesapceOptions parses the build options from all namespaces except user namespace
+// NamespaceOptions parses the build options for all namespaces except for user namespace.
func NamespaceOptions(c *cli.Context) (namespaceOptions buildah.NamespaceOptions, networkPolicy buildah.NetworkConfigurationPolicy, err error) {
options := make(buildah.NamespaceOptions, 0, 7)
policy := buildah.NetworkDefault