Skip to content
This repository has been archived by the owner on Feb 27, 2018. It is now read-only.

Fixes #209: CLI option for number of CPUs when creating a new boot2docker VM #341

Merged
merged 1 commit into from
Feb 24, 2015

Conversation

mohitsoni
Copy link
Contributor

This pull request enhances boot2docker init by allowing user to pass --cpus to configure the number of cpus allocated to boot2docker-vm during vm creation.

@mohitsoni
Copy link
Contributor Author

@SvenDowideit @steeve If this looks good, can we please merge this one ? Also, I would recommend having a similar feature in docker-compose.

@@ -116,6 +116,7 @@ func config() (*flag.FlagSet, error) {
flags.StringVar(&B2D.SSHKey, "sshkey", filepath.Join(sshdir, "id_boot2docker"), "path to SSH key to use.")
flags.UintVarP(&B2D.DiskSize, "disksize", "s", 20000, "boot2docker disk image size (in MB).")
flags.UintVarP(&B2D.Memory, "memory", "m", 2048, "virtual machine memory size (in MB).")
flags.UintVarP(&B2D.CPUs, "cpus", "c", 1, "number of cpus for boot2docker.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this default to runtime.NumCPU()?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, cpus in the help text should probably be CPUs instead.

@mohitsoni
Copy link
Contributor Author

Okay, I have addressed your comments.

@tianon
Copy link
Contributor

tianon commented Feb 23, 2015

LGTM

cc @gmlewis @Moghedrin

tianon added a commit that referenced this pull request Feb 24, 2015
Fixes #209: CLI option for number of CPUs when creating a new boot2docker VM
@tianon tianon merged commit 0a3a250 into boot2docker:master Feb 24, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants