mirror of
https://github.com/containers/podman.git
synced 2026-04-01 21:44:09 -04:00
* 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>
19 lines
509 B
Go
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())
|
|
}
|