func WithDefaultProfile(name string) oci.SpecOpts {
	return func(_ context.Context, _ oci.Client, _ *containers.Container, s *specs.Spec) error {
		if err := LoadDefaultProfile(name); err != nil {
			return err
		}
		s.Process.ApparmorProfile = name
		return nil
	}
}
WithDefaultProfile will generate a default apparmor profile under the provided name
for the container.  It is only generated if a profile under that name does not exist.
package apparmor
import (
	"bytes"
	"context"
	"io/ioutil"
	"os"
	"github.com/containerd/containerd/containers"
	"github.com/containerd/containerd/oci"
	specs "github.com/opencontainers/runtime-spec/specs-go"
	"github.com/pkg/errors"
)
func WithProfile(profile string) oci.SpecOpts {
	return func(_ context.Context, _ oci.Client, _ *containers.Container, s *specs.Spec) error {
		s.Process.ApparmorProfile = profile
		return nil
	}
}