Beispiel #1
0
func oci2docker(c *cli.Context) {
	ociPath := c.String("oci-bundle")
	imgName := c.String("image-name")
	port := c.String("port")

	if ociPath == "" {
		cli.ShowCommandHelp(c, "convert")
		return
	}

	if imgName == "" {
		cli.ShowCommandHelp(c, "convert")
		return
	}

	_, err := os.Stat(ociPath)
	if os.IsNotExist(err) {
		cli.ShowCommandHelp(c, "convert")
		return
	}

	convert.RunOCI2Docker(ociPath, imgName, port)

	return
}
Beispiel #2
0
func oci2docker(c *cli.Context) {
	ociPath := c.String("oci-bundle")

	_, err := os.Stat(ociPath)
	if os.IsNotExist(err) {
		cli.ShowCommandHelp(c, "convert")
	}

	convert.RunOCI2Docker(ociPath)
}