1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

add host name parameter to "run" command

fixes #243
This commit is contained in:
Mikhail Sobolev 2013-04-01 23:03:24 +03:00
parent dcc9dfb27d
commit f65fc1e766
2 changed files with 3 additions and 0 deletions

View file

@ -67,6 +67,7 @@ func ParseRun(args []string, stdout io.Writer) (*Config, error) {
cmd.SetOutput(ioutil.Discard)
}
flHostname := cmd.String("h", "", "Container host name")
flUser := cmd.String("u", "", "Username or UID")
flDetach := cmd.Bool("d", false, "Detached mode: leave the container running in the background")
flStdin := cmd.Bool("i", false, "Keep stdin open even if not attached")
@ -92,6 +93,7 @@ func ParseRun(args []string, stdout io.Writer) (*Config, error) {
runCmd = parsedArgs[1:]
}
config := &Config{
Hostname: *flHostname,
Ports: flPorts,
User: *flUser,
Tty: *flTty,

View file

@ -264,6 +264,7 @@ run
-m=0: Memory limit (in bytes)
-p=[]: Map a network port to the container
-t=false: Allocate a pseudo-tty
-h="": Container host name
-u="": Username or UID