mirror of
https://github.com/containers/podman.git
synced 2025-10-09 14:56:05 +08:00
Make 'kpod create' also create the container in runc
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
This commit is contained in:
@ -11,6 +11,7 @@ import (
|
|||||||
"github.com/opencontainers/selinux/go-selinux/label"
|
"github.com/opencontainers/selinux/go-selinux/label"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/projectatomic/libpod/libpod"
|
"github.com/projectatomic/libpod/libpod"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
pb "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
|
pb "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
|
||||||
)
|
)
|
||||||
@ -206,6 +207,12 @@ func createCmd(c *cli.Context) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logrus.Debug("new container created ", ctr.ID())
|
||||||
|
if err := ctr.Init(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
logrus.Debug("container storage created for %q", ctr.ID())
|
||||||
|
|
||||||
if c.String("cidfile") != "" {
|
if c.String("cidfile") != "" {
|
||||||
libpod.WriteFile(ctr.ID(), c.String("cidfile"))
|
libpod.WriteFile(ctr.ID(), c.String("cidfile"))
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user