Merge pull request #382 from runcom/not-only-runc
cmd/containerd: extend to other OCI runtimes
This commit is contained in:
		| @@ -55,7 +55,7 @@ high performance container runtime | |||||||
| 		}, | 		}, | ||||||
| 		cli.StringFlag{ | 		cli.StringFlag{ | ||||||
| 			Name:  "runtime", | 			Name:  "runtime", | ||||||
| 			Usage: "default runtime for execution", | 			Usage: "runtime for execution", | ||||||
| 			Value: "runc", | 			Value: "runc", | ||||||
| 		}, | 		}, | ||||||
| 		cli.StringFlag{ | 		cli.StringFlag{ | ||||||
| @@ -103,13 +103,18 @@ high performance container runtime | |||||||
| 			return err | 			return err | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		var executor execution.Executor | 		var ( | ||||||
| 		switch context.GlobalString("runtime") { | 			executor execution.Executor | ||||||
|  | 			runtime  = context.GlobalString("runtime") | ||||||
|  | 		) | ||||||
|  | 		switch runtime { | ||||||
| 		case "runc": | 		case "runc": | ||||||
| 			executor, err = oci.New(context.GlobalString("root")) | 			executor, err = oci.New(context.GlobalString("root")) | ||||||
| 			if err != nil { | 			if err != nil { | ||||||
| 				return err | 				return err | ||||||
| 			} | 			} | ||||||
|  | 		default: | ||||||
|  | 			return fmt.Errorf("oci: runtime %q not implemented", runtime) | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		// Get events publisher | 		// Get events publisher | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Michael Crosby
					Michael Crosby