summaryrefslogtreecommitdiff
path: root/vendor/github.com/projectatomic/buildah/config_seccomp.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-09-06 16:10:06 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-09-07 12:57:09 +0000
commitd92650a922fa82852d6f3310eff24e6b8a93fb03 (patch)
treea4430220fe8529b7cfd29685c36472616b48db54 /vendor/github.com/projectatomic/buildah/config_seccomp.go
parent782caea8015679e5d67d15b9562488da06cdfcd5 (diff)
downloadpodman-d92650a922fa82852d6f3310eff24e6b8a93fb03.tar.gz
podman-d92650a922fa82852d6f3310eff24e6b8a93fb03.tar.bz2
podman-d92650a922fa82852d6f3310eff24e6b8a93fb03.zip
use layer cache when building images
to more closely mimic docker default behavior, the --layers cli option is set to true by default for podman. the buildah environment variable of BUILDAH_LAYERS is still honored and will override the command line input. this should be considered in place of PR #1383. Many thanks for Scott McCarty for inspiring this welcome change. Signed-off-by: baude <bbaude@redhat.com> Closes: #1422 Approved by: rhatdan
Diffstat (limited to 'vendor/github.com/projectatomic/buildah/config_seccomp.go')
-rw-r--r--vendor/github.com/projectatomic/buildah/config_seccomp.go35
1 files changed, 0 insertions, 35 deletions
diff --git a/vendor/github.com/projectatomic/buildah/config_seccomp.go b/vendor/github.com/projectatomic/buildah/config_seccomp.go
deleted file mode 100644
index a5bb010c0..000000000
--- a/vendor/github.com/projectatomic/buildah/config_seccomp.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// +build seccomp
-
-package buildah
-
-import (
- "io/ioutil"
-
- "github.com/opencontainers/runtime-spec/specs-go"
- "github.com/pkg/errors"
- seccomp "github.com/seccomp/containers-golang"
-)
-
-func setupSeccomp(spec *specs.Spec, seccompProfilePath string) error {
- switch seccompProfilePath {
- case "unconfined":
- spec.Linux.Seccomp = nil
- case "":
- seccompConfig, err := seccomp.GetDefaultProfile(spec)
- if err != nil {
- return errors.Wrapf(err, "loading default seccomp profile failed")
- }
- spec.Linux.Seccomp = seccompConfig
- default:
- seccompProfile, err := ioutil.ReadFile(seccompProfilePath)
- if err != nil {
- return errors.Wrapf(err, "opening seccomp profile (%s) failed", seccompProfilePath)
- }
- seccompConfig, err := seccomp.LoadProfile(string(seccompProfile), spec)
- if err != nil {
- return errors.Wrapf(err, "loading seccomp profile (%s) failed", seccompProfilePath)
- }
- spec.Linux.Seccomp = seccompConfig
- }
- return nil
-}