getContainer returns the specified container instance by loading it from a state directory (root).
(context *cli.Context)
| 29 | // getContainer returns the specified container instance by loading it from |
| 30 | // a state directory (root). |
| 31 | func getContainer(context *cli.Context) (*libcontainer.Container, error) { |
| 32 | id := context.Args().First() |
| 33 | if id == "" { |
| 34 | return nil, errEmptyID |
| 35 | } |
| 36 | root := context.GlobalString("root") |
| 37 | return libcontainer.Load(root, id) |
| 38 | } |
| 39 | |
| 40 | func getDefaultImagePath() string { |
| 41 | cwd, err := os.Getwd() |
no test coverage detected
searching dependent graphs…