Add --hostport to run-container.

This helps as a starting point to show a single-machine container.
Its easier to use this as an example to show where host port mapping breaks and move on to
services.
This commit is contained in:
Rohit Jnagal
2015-04-29 23:54:23 +00:00
parent a100e976ec
commit 9cbfb0c3f9
7 changed files with 85 additions and 10 deletions

View File

@@ -60,6 +60,7 @@ func NewCmdRunContainer(f *cmdutil.Factory, out io.Writer) *cobra.Command {
cmd.Flags().Bool("dry-run", false, "If true, only print the object that would be sent, without sending it.")
cmd.Flags().String("overrides", "", "An inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field.")
cmd.Flags().Int("port", -1, "The port that this container exposes.")
cmd.Flags().Int("hostport", -1, "The host port mapping for the container port. To demonstrate a single-machine container.")
cmd.Flags().StringP("labels", "l", "", "Labels to apply to the pod(s) created by this call to run-container.")
return cmd
}