2016-07-08 22:54:48 +00:00
|
|
|
// +build linux,!seccomp
|
2016-03-18 18:50:19 +00:00
|
|
|
|
2018-02-05 21:05:59 +00:00
|
|
|
package daemon // import "github.com/docker/docker/daemon"
|
2016-03-18 18:50:19 +00:00
|
|
|
|
|
|
|
import (
|
2019-04-10 18:45:14 +00:00
|
|
|
"context"
|
2016-05-31 15:54:55 +00:00
|
|
|
"fmt"
|
|
|
|
|
2019-04-10 18:45:14 +00:00
|
|
|
"github.com/containerd/containerd/containers"
|
|
|
|
coci "github.com/containerd/containerd/oci"
|
2016-03-18 18:50:19 +00:00
|
|
|
"github.com/docker/docker/container"
|
|
|
|
)
|
|
|
|
|
2019-10-12 22:39:34 +00:00
|
|
|
const supportsSeccomp = false
|
2016-07-08 22:54:48 +00:00
|
|
|
|
2019-04-10 18:45:14 +00:00
|
|
|
// WithSeccomp sets the seccomp profile
|
|
|
|
func WithSeccomp(daemon *Daemon, c *container.Container) coci.SpecOpts {
|
|
|
|
return func(ctx context.Context, _ coci.Client, _ *containers.Container, s *coci.Spec) error {
|
|
|
|
if c.SeccompProfile != "" && c.SeccompProfile != "unconfined" {
|
|
|
|
return fmt.Errorf("seccomp profiles are not supported on this daemon, you cannot specify a custom seccomp profile")
|
|
|
|
}
|
|
|
|
return nil
|
2016-05-31 15:54:55 +00:00
|
|
|
}
|
2016-03-18 18:50:19 +00:00
|
|
|
}
|