Files
podman/pkg/varlinkapi/containers_create.go
Jhon Honce e0847f5457 V2 podman system service
* Added support for system service
* Enabled linting on the varlinkapi source, needed to support V2
  service command
* Added support for PODMAN_SOCKET

Skip linting deprecated code

Rather than introduce bugs by correcting deprecated code, linting the
code is being skipped. Code that is being ported into V2 is being
checked.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-04-07 19:22:10 -07:00

19 lines
509 B
Go

// +build varlink
package varlinkapi
import (
"github.com/containers/libpod/cmd/podman/shared"
iopodman "github.com/containers/libpod/pkg/varlink"
)
// CreateContainer ...
func (i *VarlinkAPI) CreateContainer(call iopodman.VarlinkCall, config iopodman.Create) error {
generic := shared.VarlinkCreateToGeneric(config)
ctr, _, err := shared.CreateContainer(getContext(), &generic, i.Runtime)
if err != nil {
return call.ReplyErrorOccurred(err.Error())
}
return call.ReplyCreateContainer(ctr.ID())
}