summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-03-29 07:31:23 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2022-04-08 09:02:52 -0400
commitdc17195bd9d1027b19c3e7f0975f17f4ebda408a (patch)
tree223a7caf22ee81fbd6a01d166c0821db4d413616 /pkg
parentf838333b7e6fae09f3ee9116b84c6e6482367298 (diff)
downloadpodman-dc17195bd9d1027b19c3e7f0975f17f4ebda408a.tar.gz
podman-dc17195bd9d1027b19c3e7f0975f17f4ebda408a.tar.bz2
podman-dc17195bd9d1027b19c3e7f0975f17f4ebda408a.zip
Vendor in new opencontainers/selinux
Also update vendor of containers/common,buildah,storage,image Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2069586 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/compat/images_build.go11
-rw-r--r--pkg/bindings/images/build.go7
2 files changed, 14 insertions, 4 deletions
diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go
index 0ebf74f98..08646202a 100644
--- a/pkg/api/handlers/compat/images_build.go
+++ b/pkg/api/handlers/compat/images_build.go
@@ -95,6 +95,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
ForceRm bool `schema:"forcerm"`
From string `schema:"from"`
HTTPProxy bool `schema:"httpproxy"`
+ IdentityLabel bool `schema:"identitylabel"`
Ignore bool `schema:"ignore"`
Isolation string `schema:"isolation"`
Jobs int `schema:"jobs"` // nolint
@@ -126,10 +127,11 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
UnsetEnvs []string `schema:"unsetenv"`
Secrets string `schema:"secrets"`
}{
- Dockerfile: "Dockerfile",
- Registry: "docker.io",
- Rm: true,
- ShmSize: 64 * 1024 * 1024,
+ Dockerfile: "Dockerfile",
+ IdentityLabel: true,
+ Registry: "docker.io",
+ Rm: true,
+ ShmSize: 64 * 1024 * 1024,
}
decoder := r.Context().Value(api.DecoderKey).(*schema.Decoder)
@@ -522,6 +524,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
DNSSearch: dnssearch,
DNSServers: dnsservers,
HTTPProxy: query.HTTPProxy,
+ IdentityLabel: types.NewOptionalBool(query.IdentityLabel),
LabelOpts: labelOpts,
Memory: query.Memory,
MemorySwap: query.MemSwap,
diff --git a/pkg/bindings/images/build.go b/pkg/bindings/images/build.go
index ab562377f..15900a2ed 100644
--- a/pkg/bindings/images/build.go
+++ b/pkg/bindings/images/build.go
@@ -19,6 +19,7 @@ import (
"strings"
"github.com/containers/buildah/define"
+ "github.com/containers/image/v5/types"
"github.com/containers/podman/v4/pkg/auth"
"github.com/containers/podman/v4/pkg/bindings"
"github.com/containers/podman/v4/pkg/domain/entities"
@@ -250,6 +251,12 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
params.Set("pullpolicy", options.PullPolicy.String())
+ switch options.CommonBuildOpts.IdentityLabel {
+ case types.OptionalBoolTrue:
+ params.Set("identitylabel", "1")
+ case types.OptionalBoolFalse:
+ params.Set("identitylabel", "0")
+ }
if options.Quiet {
params.Set("q", "1")
}