Replace the original default spec with containerd default spec
The original default spec contain `seccomp` configuration, but some OS do not support this feature, such as ubuntu14.04, and `make test-cri` always fail. The containerd default spec dosen't contain `seccomp`, so I think we could replace the default spec with containerd default spec. Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/containerd/containers"
|
||||
prototypes "github.com/gogo/protobuf/types"
|
||||
"github.com/golang/glog"
|
||||
@@ -181,7 +182,11 @@ func (c *criContainerdService) CreateContainer(ctx context.Context, r *runtime.C
|
||||
func (c *criContainerdService) generateContainerSpec(id string, sandboxPid uint32, config *runtime.ContainerConfig,
|
||||
sandboxConfig *runtime.PodSandboxConfig, imageConfig *imagespec.ImageConfig, extraMounts []*runtime.Mount) (*runtimespec.Spec, error) {
|
||||
// Creates a spec Generator with the default spec.
|
||||
g := generate.New()
|
||||
spec, err := containerd.GenerateSpec()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
g := generate.NewFromSpec(spec)
|
||||
|
||||
// Set the relative path to the rootfs of the container from containerd's
|
||||
// pre-defined directory.
|
||||
|
Reference in New Issue
Block a user