github.com/docker/docker@v299999999.0.0-20200612211812-aaf470eca7b5+incompatible/daemon/seccomp_disabled.go (about)

     1  // +build linux,!seccomp
     2  
     3  package daemon // import "github.com/docker/docker/daemon"
     4  
     5  import (
     6  	"context"
     7  	"fmt"
     8  
     9  	"github.com/containerd/containerd/containers"
    10  	coci "github.com/containerd/containerd/oci"
    11  	"github.com/docker/docker/container"
    12  )
    13  
    14  const supportsSeccomp = false
    15  
    16  // WithSeccomp sets the seccomp profile
    17  func WithSeccomp(daemon *Daemon, c *container.Container) coci.SpecOpts {
    18  	return func(ctx context.Context, _ coci.Client, _ *containers.Container, s *coci.Spec) error {
    19  		if c.SeccompProfile != "" && c.SeccompProfile != "unconfined" {
    20  			return fmt.Errorf("seccomp profiles are not supported on this daemon, you cannot specify a custom seccomp profile")
    21  		}
    22  		return nil
    23  	}
    24  }