mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-12 09:46:25 +08:00
28dadc538c
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
30 lines
449 B
Go
30 lines
449 B
Go
package nsinit
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"log"
|
|
|
|
"github.com/codegangsta/cli"
|
|
)
|
|
|
|
var configCommand = cli.Command{
|
|
Name: "config",
|
|
Usage: "display the container configuration",
|
|
Action: configAction,
|
|
}
|
|
|
|
func configAction(context *cli.Context) {
|
|
container, err := loadContainer()
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
data, err := json.MarshalIndent(container, "", "\t")
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
fmt.Printf("%s", data)
|
|
}
|