func (e *podmanEngine) RunContainer(image string, cmd string, volsrc string, voldest string) (output string, containerStarted bool, err error) {
	if !e.pullImage(image) {
		logrus.Debugf("Unable to pull image using podman : %s", image)
		return "", false, fmt.Errorf("unable to pull image")
	}
	args := []string{"run", "--rm"}
	if volsrc != "" && voldest != "" {
		args = append(args, "-v", volsrc+":"+voldest)
	}
	args = append(args, image)
	if cmd != "" {
		args = append(args, cmd)
	}
	detectcmd := exec.Command("podman", args...)
	logrus.Debugf("Running detect on image %s", image)
	o, err := detectcmd.CombinedOutput()
	if err != nil {
		logrus.Debugf("Detect failed %s : %s : %s", image, err, output)
		return string(o), false, err
	}
	return string(o), true, nil
}
RunContainer executes a container using podman
package container
import (
	"encoding/json"
	"fmt"
	"os/exec"
	"github.com/docker/docker/api/types"
	"github.com/sirupsen/logrus"
)
type podmanEngine struct {
	availableImages map[string]bool
}
func newPodmanEngine() *podmanEngine {
	return &podmanEngine{
		availableImages: map[string]bool{},
	}
}
func (e *podmanEngine) InspectImage(image string) (t types.ImageInspect, err error) {
	inspectcmd := exec.Command("podman", "inspect", image)
	logrus.Debugf("Inspecting image %s", image)
	output, err := inspectcmd.CombinedOutput()
	if err != nil {
		logrus.Debugf("Unable to inspect image %s : %s, %s", image, err, output)
		return t, err
	}
	t = types.ImageInspect{}
	err = json.Unmarshal(output, &t)
	if err != nil {
		logrus.Debugf("Error in unmarshalling json %s: %s.", output, err)
	}
	return t, err
}
func (e *podmanEngine) pullImage(image string) bool {
	if a, ok := e.availableImages[image]; ok {
		return a
	}
	pullcmd := exec.Command("podman", "pull", image)
	logrus.Debugf("Pulling image %s", image)
	output, err := pullcmd.CombinedOutput()
	if err != nil {
		logrus.Warnf("Error while pulling builder %s : %s : %s", image, err, output)
		e.availableImages[image] = false
		return false
	}
	e.availableImages[image] = true
	return true
}