mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-09-01 21:27:53 +00:00
* move cmd/podman/varlink/* to pkg/varlink to support podmanV2 refactor * update Makefile * reformatted all impacted code Signed-off-by: Jhon Honce <jhonce@redhat.com>
18 lines
508 B
Go
18 lines
508 B
Go
// +build varlink
|
|
|
|
package varlinkapi
|
|
|
|
import (
|
|
"github.com/containers/libpod/cmd/podman/shared"
|
|
iopodman "github.com/containers/libpod/pkg/varlink"
|
|
)
|
|
|
|
// CreateContainer ...
|
|
func (i *LibpodAPI) 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())
|
|
}
|