mirror of
https://github.com/containers/podman.git
synced 2025-11-13 17:47:13 +08:00
support multi-image (docker) archives
Support loading and saving tarballs with more than one image. Add a new `/libpod/images/export` endpoint to the rest API to allow for exporting/saving multiple images into an archive. Note that a non-release version of containers/image is vendored. A release version must be vendored before cutting a new Podman release. We force the containers/image version via a replace in the go.mod file; this way go won't try to match the versions. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
29
vendor/github.com/containers/common/pkg/seccomp/validate.go
generated
vendored
Normal file
29
vendor/github.com/containers/common/pkg/seccomp/validate.go
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
// +build seccomp
|
||||
|
||||
package seccomp
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// ValidateProfile does a basic validation for the provided seccomp profile
|
||||
// string.
|
||||
func ValidateProfile(content string) error {
|
||||
profile := &Seccomp{}
|
||||
if err := json.Unmarshal([]byte(content), &profile); err != nil {
|
||||
return errors.Wrap(err, "decoding seccomp profile")
|
||||
}
|
||||
|
||||
spec, err := setupSeccomp(profile, nil)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "create seccomp spec")
|
||||
}
|
||||
|
||||
if _, err := BuildFilter(spec); err != nil {
|
||||
return errors.Wrap(err, "build seccomp filter")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user