summaryrefslogtreecommitdiff
path: root/cmd/podman/shared
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-02-12 19:13:23 +0100
committerGitHub <noreply@github.com>2020-02-12 19:13:23 +0100
commite74ad3596393a476b7e233da736a610ef19bc4a1 (patch)
tree0bfa9cbe917eaf51bb9be70b5e74d0e80af4910a /cmd/podman/shared
parentdd5df42be94ee6df9351a45eea563df146e9212e (diff)
parent65d10ffab338ab0142e6595a646dab42f64af7d2 (diff)
downloadpodman-e74ad3596393a476b7e233da736a610ef19bc4a1.tar.gz
podman-e74ad3596393a476b7e233da736a610ef19bc4a1.tar.bz2
podman-e74ad3596393a476b7e233da736a610ef19bc4a1.zip
Merge pull request #5187 from vrothberg/pkg-seccomp
add pkg/seccomp
Diffstat (limited to 'cmd/podman/shared')
-rw-r--r--cmd/podman/shared/create.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go
index 3062b0ca3..e3a39a421 100644
--- a/cmd/podman/shared/create.go
+++ b/cmd/podman/shared/create.go
@@ -22,6 +22,7 @@ import (
"github.com/containers/libpod/pkg/inspect"
ns "github.com/containers/libpod/pkg/namespaces"
"github.com/containers/libpod/pkg/rootless"
+ "github.com/containers/libpod/pkg/seccomp"
cc "github.com/containers/libpod/pkg/spec"
"github.com/containers/libpod/pkg/util"
"github.com/docker/go-connections/nat"
@@ -31,10 +32,6 @@ import (
"github.com/sirupsen/logrus"
)
-// seccompLabelKey is the key of the image annotation embedding a seccomp
-// profile.
-const seccompLabelKey = "io.containers.seccomp.profile"
-
func CreateContainer(ctx context.Context, c *GenericCLIResults, runtime *libpod.Runtime) (*libpod.Container, *cc.CreateConfig, error) {
var (
healthCheck *manifest.Schema2HealthConfig
@@ -713,11 +710,11 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod.
// SECCOMP
if data != nil {
- if value, exists := labels[seccompLabelKey]; exists {
+ if value, exists := labels[seccomp.ContainerImageLabel]; exists {
secConfig.SeccompProfileFromImage = value
}
}
- if policy, err := cc.LookupSeccompPolicy(c.String("seccomp-policy")); err != nil {
+ if policy, err := seccomp.LookupPolicy(c.String("seccomp-policy")); err != nil {
return nil, err
} else {
secConfig.SeccompPolicy = policy