You might want to do this to allocate extra RAM and disk size for Docker (esp. when dealing with large container images)
-
Ensure that there's not yet been a Docker machine called 'default' (
docker-machine ls
). If so, you should remove it (docker-machine rm default
).
In theory, you can just create a second machine with a different name. This is not recommended since VirtualBox assigns IP addresses to each machine non-deterministically every time you restart your computer, causing docker-machine to choke on TLS cert-related issues -
Run the following in Bash. If in MS-DOS command prompt, use
^
instead of\
docker-machine create \
-d virtualbox \
--virtualbox-cpu-count 4 \
--virtualbox-memory 4096 \
--virtualbox-no-share \
--virtualbox-disk-size 50000 \
--engine-env http_proxy=http://192.168.0.78:8080 \
--engine-env https_proxy=http://192.168.0.78:8080 \
--engine-env no_proxy=127.0.0.1,localhost \
default
The above setting:
- Assigns 4 CPU cores
- Allocates 50 gigs of disk space
- Allocates 4gb RAM
- Sets HTTP Proxy settings for corporate environments (to http://192.168.0.78:8080 as an example)