mirror of
https://github.com/containers/podman
synced 2024-10-20 17:23:30 +00:00
Merge pull request #79 from mheon/fix_create
Make 'kpod create' also create the container in runc
This commit is contained in:
commit
55167ef982
|
@ -11,6 +11,7 @@ import (
|
|||
"github.com/opencontainers/selinux/go-selinux/label"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/projectatomic/libpod/libpod"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli"
|
||||
pb "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
|
||||
)
|
||||
|
@ -206,6 +207,12 @@ func createCmd(c *cli.Context) error {
|
|||
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") != "" {
|
||||
libpod.WriteFile(ctr.ID(), c.String("cidfile"))
|
||||
} else {
|
||||
|
|
|
@ -11,12 +11,14 @@ function teardown() {
|
|||
}
|
||||
|
||||
@test "create a container based on local image" {
|
||||
skip "Reenable after kpod rm merges, and use rm to clean up"
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} create $BB ls
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "create a container based on a remote image" {
|
||||
skip "Reenable after kpod rm merges, and use rm to clean up"
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} create ${BB_GLIBC} ls
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
|
|
|
@ -29,7 +29,10 @@ function teardown() {
|
|||
ctr_id="$output"
|
||||
run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} pause $ctr_id"
|
||||
echo "$output"
|
||||
[ "$status" -eq 1 ]
|
||||
[ "$status" -eq 0 ]
|
||||
run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} unpause $ctr_id"
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rm $ctr_id"
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
|
|
Loading…
Reference in a new issue