mirror of
https://github.com/docker/compose.git
synced 2026-10-08 21:21:10 +00:00
Add cpu and memory limits
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
parent
b84be73ce7
commit
0a57fd7d5c
5 changed files with 47 additions and 9 deletions
|
|
@ -44,6 +44,8 @@ func Command() *cobra.Command {
|
|||
cmd.Flags().StringArrayVarP(&opts.Labels, "label", "l", []string{}, "Set meta data on a container")
|
||||
cmd.Flags().StringArrayVarP(&opts.Volumes, "volume", "v", []string{}, "Volume. Ex: user:key@my_share:/absolute/path/to/target")
|
||||
cmd.Flags().BoolP("detach", "d", true, "Run container in background and print container ID")
|
||||
cmd.Flags().Float64Var(&opts.Cpus, "cpus", 1., "Number of CPUs")
|
||||
cmd.Flags().VarP(&opts.Memory, "memory", "m", "Memory limit")
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue