Skip to content

Instantly share code, notes, and snippets.

@teddyking
Created January 21, 2017 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teddyking/fec80fd0350acc45c26d155979e94383 to your computer and use it in GitHub Desktop.
Save teddyking/fec80fd0350acc45c26d155979e94383 to your computer and use it in GitHub Desktop.
Action: func(context *cli.Context) error {
if err := checkArgs(context, 1, exactArgs); err != nil {
return err
}
if err := revisePidFile(context); err != nil {
return err
}
spec, err := setupSpec(context)
if err != nil {
return err
}
status, err := startContainer(context, spec, true)
if err != nil {
return err
}
// exit with the container's exit status so any external supervisor is
// notified of the exit with the correct exit status.
os.Exit(status)
return nil
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment