---
author: Sam White
toc-title: Contents
toc-depth: 5
toc-location: left
date: 2016-06-14 18:10:13+00:00
layout: post
slug: docker-virtualbox-defaults-on-os-x
title: Docker - VirtualBox Defaults on OS X
categories:
  - 2016
  - Computer Servicing
tags:
  - docker
  - OS X
  - roadrunner
  - virtualbox
  - Xserve
---

I noticed a discrepancy between what system info is detected natively on Roadrunner (Apple Xserve) and what was being shown when I started a Docker container.

Here's what Roadrunner's system info looks like outside of a Docker container:

![](https://eagle.fish.washington.edu/Arabidopsis/20160613_roadrunner_system.png)(http://eagle.fish.washington.edu/Arabidopsis/20160613_roadrunner_system.png)



However, here's what is seen when running a Docker container:

![](https://eagle.fish.washington.edu/Arabidopsis/20160613_roadrunner_docker_default_system.png)(http://eagle.fish.washington.edu/Arabidopsis/20160613_roadrunner_docker_default_system.png)





It's important to notice the that the Docker container is only seeing 2 CPUs. Ideally, the Docker container would see that this system has 8 cores available. By default, however, it does not. In order to remedy this, the user has to adjust settings in VirtualBox. VirtualBox is a virtual machine thingy that gets installed with the Docker Toolbox for OS X. Apparently, Docker runs within VirtualBox, but this is not really transparent to a beginner Docker user on OS X.

To change the way VirtualBox (and, in turn, Docker) can access the full system hardware, you must launch the VirtualBox application (if you installed Docker using Docker Toolbox, you should be able to find this in your Applications folder). Once you've launched VirtualBox, you'll have to turn off the virtual machine that's currently running. Once that's been accomplished, you can make changes and then restart the virtual machine.





## Shutdown VirtualBox machine before you can make changes:



![](https://eagle.fish.washington.edu/Arabidopsis/20160613_virtualbox_shutdown.png)(http://eagle.fish.washington.edu/Arabidopsis/20160613_virtualbox_shutdown.png)





## 





## Here are the default CPU settings that VirtualBox is using:



![](https://eagle.fish.washington.edu/Arabidopsis/20160613_virtualbox_default_cpus.png)(http://eagle.fish.washington.edu/Arabidopsis/20160613_virtualbox_default_cpus.png)







## Maxed out the CPU slider:



![](https://eagle.fish.washington.edu/Arabidopsis/20160613_virtualbox_eight_cpus.png)(http://eagle.fish.washington.edu/Arabidopsis/20160613_virtualbox_eight_cpus.png)









## Here are the default RAM settings that VirtualBox is using:



![](https://eagle.fish.washington.edu/Arabidopsis/20160613_virtualbox_default_RAM.png)(http://eagle.fish.washington.edu/Arabidopsis/20160613_virtualbox_default_RAM.png)









## Changed RAM slider to 24GB:



![](https://eagle.fish.washington.edu/Arabidopsis/20160613_virtualbox_24GB_RAM.png)(http://eagle.fish.washington.edu/Arabidopsis/20160613_virtualbox_24GB_RAM.png)









## Now, let's see what the Docker container reports for system info after making these changes:



![](https://eagle.fish.washington.edu/Arabidopsis/20160613_roadrunner_docker_new_system.png)(http://eagle.fish.washington.edu/Arabidopsis/20160613_roadrunner_docker_new_system.png)



Looking at the CPUs now, we see it has 8 listed (as opposed to only 2 initially). I think this means that Docker now has full access to the hardware on this machine.

This situation is a weird shortcoming of Docker (and/or VirtualBox). Additionally, I think this issue might only exist on the OS X and Windows versions of Docker, since they require the installation of the Docker Toolbox (which installs VirtualBox). I don't think Linux installations suffer from this issue.
