mirror of
https://github.com/containers/podman.git
synced 2025-06-18 07:28:57 +08:00

remote podman v1 and replace with podman v2. Signed-off-by: Brent Baude <bbaude@redhat.com>
18 lines
445 B
Go
18 lines
445 B
Go
// +build varlink
|
|
|
|
package varlinkapi
|
|
|
|
import (
|
|
iopodman "github.com/containers/libpod/pkg/varlink"
|
|
)
|
|
|
|
// CreateContainer ...
|
|
func (i *VarlinkAPI) CreateContainer(call iopodman.VarlinkCall, config iopodman.Create) error {
|
|
generic := VarlinkCreateToGeneric(config)
|
|
ctr, _, err := CreateContainer(getContext(), &generic, i.Runtime)
|
|
if err != nil {
|
|
return call.ReplyErrorOccurred(err.Error())
|
|
}
|
|
return call.ReplyCreateContainer(ctr.ID())
|
|
}
|