If you're running MacOS or Windows you have a few options for installing Docker. There's even a third way too, and we'll compare them here.
Quick Jump: OS and Hardware Requirements|Pros and Cons|Which One Should I Use?
Docker Toolbox installs docker, docker-compose, and docker-machine in /usr/local/bin on your Mac. It also installs VirtualBox. It also installs VirtualBox. At installation time, Toolbox uses docker-machine to provision a VirtualBox VM called default, running the boot2docker Linux distribution, with Docker Engine with certificates located on. Docker Machine maintainer here. I don't think adjusting the config.json manually will work. Your two options are to either create the machine with -virtualbox-memory set, or to adjust the VM's memory in the VirtualBox GUI ('Settings System' for that VM I think). Make sure the machine is powered off and there should be a little slider that works.
If you’re on MacOS or Windows you can install Docker with:
- Docker for Mac / Windows (now known as Docker Desktop)
- Docker Toolbox
- Running your own Virtual Machine and installing Docker yourself
All 3 of those options have their own pros and cons and in this article we’re going to cover them. If you’re looking for a high level overview of what Docker for Mac / Windows and Docker Toolbox is, then check out this article on getting to know Docker’s ecosystem.
OS and Hardware Requirements
It’s helpful to know what you can install before we compare everything, so let’s do that:
Docker for Mac (Docker Desktop)
Docker for Mac requires that you’re running Yosemite 10.10.3+ or newer but it’s worth mentioning that you should upgrade to 10.11+ because 10.10.x releases are considered “use at your own risk”.
You can run VirtualBox 6+ alongside Docker for Mac. This is pretty useful because you might have some legacy apps running in Vagrant / VirtualBox to deal with (I know I do!).
Docker for Windows (Docker Desktop)
As of May 27th 2020, Microsoft released Windows 10 build 2004 (Spring 2020) that allows you to run Docker Deskop on all editions of Windows 10, including Home.
For years prior to that you could only run it on Windows Pro, Enterprise or any edition that had Hyper-V available, but since this new Spring 2020 build WSL 2 is available and Docker Desktop can be configured to use it.
You can also run VirtualBox 6+ alongside Docker Desktop too, although the performance is so-so, but you can use this in a pinch if you have old legacy apps that use Vagrant and VirtualBox together.
Docker Toolbox
If you can’t run Docker for Mac or Docker for Windows then there’s the Docker Toolbox. It has much less strict requirements. As long as you can run VirtualBox then you’re good to go (Docker Toolbox manages this for you).
It works all the way back to MacOS 10.8 and Windows 7 (yep, even Home editions).
Your own Virtual Machine
Docker will happily run inside of VirtualBox, VMWare or any other Type 1 / 2 Hypervisor that’s running a major distribution of Linux.
So, similarly to the Docker Toolbox, rolling your own VM has the same requirements.
Pros and Cons
Now for the good stuff!
Docker for Mac / Docker for Windows (Docker Desktop)
Pros
- Offers the most “native” experience, you can easily use any terminal you you want since Docker is effectively running on
localhost
from MacOS / Windows’ POV. - Docker is heavily developing and polishing this solution.
Cons
- On certain MacOS hardware combos the volume performance can be a little slow.
- I can legit say there are not any “wow this sucks!” cons for Windows, it’s really solid.
Docker Toolbox
Pros
- Offers an “out of the box” Docker experience if you have no other choice.
Cons
- You need to either use the Docker Quickstart Terminal, or configure your own terminal to connect to the Docker Daemon running a VM.
- Not a native solution, so you’ll need to access your Docker Machine’s IP address if you’re developing web apps. Example:
192.168.99.100
instead oflocalhost
. - Unless you jump through hoops, your code needs to live in your Windows user directory such as
C:UsersNicksrcmyapp
. Otherwise Docker won’t be able to find it. - Suffers from typical VirtualBox edge case bugs and mount performance issues.
Your own Virtual Machine
I’m not going to bother listing a pros and cons here because I wouldn’t recommend doing this UNLESS you’re stuck on Windows 7. But more on that in a bit…
Which One Should I Use?
If you’re interested in Docker, you’re a smart person and you probably came to the conclusion that using Docker for Mac or Docker for Windows is a good idea as long as you can run it.
My recommendation would be to try Docker for Mac / Windows first, and test it against your actual use cases. The performance issues may or may not be a concern, especially since everyone’s needs and computer specs are different.
I’ve been using Docker Desktop on Windows for full time development since late 2018 and it’s been nothing short of fantastic. Currently I use it with WSL 2, but it was really good with WSL 1 along with Hyper-V too.
On Windows 7 and Like the Idea of Running Linux Too?
I want to mention a “roll your own VM” solution for Windows users because I feel like there’s an even better way to run Docker on Windows if you also like Linux and are stuck not being able to use Windows 10.
It involves running VMWare Player in a special mode called “Unity mode”. This basically allows you to run Windows and Linux together seamlessly as 1 operating system.
There’s no dual booting and Linux applications (even graphical apps) run in their own floating windows. Then you can install Docker natively on Linux inside of the VM.
The performance is excellent and the entire set up is free too.
I used this set up for about 5 years until Docker Desktop was available. It gives you the best of both worlds. For example, I run high end audio / video apps on Windows while recording courses and screencasts that cover Linux content. It all works great (even for full time development).
You can watch a video guide and see screenshots on how to do that in this post on creating an awesome Linux development environment in Windows.
Are you using the Docker Toolbox, Docker for Mac / Windows or your own VM?
Legacy desktop solution. Docker Toolbox is for older Mac and Windows systems that do not meet the requirements of Docker Desktop for Mac and Docker Desktop for Windows. We recommend updating to the newer applications, if possible.
Estimated reading time: 10 minutes Docker Toolbox provides a way to use Docker on Windows systems that do not meetminimal system requirements for the Docker Desktop for Windowsapp.
What you get and how it works
Docker Toolbox includes the following Docker tools:
- Docker CLI client for running Docker Engine to create images and containers
- Docker Machine so you can run Docker Engine commands from Windows terminals
- Docker Compose for running the
docker-compose
command - Kitematic, the Docker GUI
- the Docker QuickStart shell preconfigured for a Docker command-line environment
- Oracle VM VirtualBox
Because the Docker Engine daemon uses Linux-specifickernel features, you can’t run Docker Engine nativelyon Windows. Instead, you must use the Docker Machinecommand,
docker-machine
, to create and attach to asmall Linux VM on your machine. This VM hosts Docker Enginefor you on your Windows system.Tip: One of the advantages of the newerDocker Desktop for Windows solution is thatit uses native virtualization and does not requireVirtualBox to run Docker.
![Docker toolbox mac brew Docker toolbox mac brew](https://toolbox.brightspotcdn.com/dims4/default/a3b3a9a/2147483647/thumbnail/1000x1000%3E/quality/90/?url=http%3A%2F%2Fziff-davis-brightspot.s3.amazonaws.com%2Ff2%2F0e%2Fb23810b341e39b2bfe7bff2650d2%2Fistock-969480346.jpg)
Step 1: Check your version
To run Docker, your machine must have a 64-bit operating system running Windows 7 or higher. Additionally, you must make sure that virtualization is enabled on your machine.To verify your machine meets these requirements, do the following:
- Right click the windows message and choose System.If you aren’t using a supported version, you could consider upgrading your operating system.If you have a recent version of Windows, consider using Docker Desktop for Windows instead. It runs natively on the Windows, so there is no need for a pre-configured Docker QuickStart shell. It also uses Hyper-V for virtualization, so the instructions below for checking virtualization will be out of date for newer Windows systems. Full install prerequisites are provided in the Docker Desktop for Windows topic in What to know before you install.
- Make sure your Windows system supports Hardware Virtualization Technology and that virtualization is enabled.
For Windows 10Run Speccy, and look at the CPU information.
For Windows 8 or 8.1Choose Start > Task Manager and navigate to the Performance tab. Under CPU you should see the following:If virtualization is not enabled on your system, follow the manufacturer’s instructions for enabling it.
For Windows 7Run a tool like the Microsoft® Hardware-Assisted Virtualization Detection Tool or Speccy, and follow the on-screen instructions. - Verify your Windows OS is 64-bit (x64)How you do this verification depends on your Windows version.
For details, see the Windows article How to determine whethera computer is running a 32-bit version or 64-bit version of theWindows operating system.
Step 2: Install Docker Toolbox
In this section, you install the Docker Toolbox software and several “helper” applications. The installation adds the following software to your machine:
- Docker Client for Windows
- Docker Toolbox management tool and ISO
- Oracle VM VirtualBox
- Git MSYS-git UNIX tools
If you have a previous version of VirtualBox installed, do not reinstall it with the Docker Toolbox installer. When prompted, uncheck it.
If you have Virtual Box running, you must shut it down before running theinstaller.
Note: Docker no longer maintains the download.docker.com url forDocker Toolbox, therefore an unsigned warning (verified publisher dialog) isdisplayed during the installation process.
- To download the latest version of Docker Toolbox, go to ToolboxReleases and download thelatest
.exe
file. - Install Docker Toolbox by double-clicking the installer.The installer launches the “Setup - Docker Toolbox” dialog.If Windows security dialog prompts you to allow the program to make a change, choose Yes. The system displays the Setup - Docker Toolbox for Windows wizard.
- Press Next to accept all the defaults and then Install.Accept all the installer defaults. The installer takes a few minutes to install all the components:
- When notified by Windows Security the installer will make changes, make sure you allow the installer to make the necessary changes.When it completes, the installer reports it was successful:
- Uncheck “View Shortcuts in File Explorer” and press Finish.
Step 3: Verify your installation
The installer adds Docker Toolbox, VirtualBox, and Kitematic to yourApplications folder. In this step, you start Docker Toolbox and run a simpleDocker command.
- On your Desktop, find the Docker QuickStart Terminal icon.
- Click the Docker QuickStart icon to launch a pre-configured Docker Toolbox terminal.If the system displays a User Account Control prompt to allow VirtualBox to make changes to your computer. Choose Yes.The terminal does several things to set up Docker Toolbox for you. When it is done, the terminal displays the
$
prompt.The terminal runs a specialbash
environment instead of the standard Windows command prompt. Thebash
environment is required by Docker. - Make the terminal active by clicking your mouse next to the
$
prompt.If you aren’t familiar with a terminal window, here are some quick tips.The prompt is traditionally a$
dollar sign. You type commands into thecommand line which is the area after the prompt. Your cursor is indicatedby a highlighted area or a|
that appears in the command line. Aftertyping a command, always press RETURN. - Type the
docker run hello-world
command and press RETURN.The command does some work for you, if everything runs well, the command’s output looks like this:
Looking for troubleshooting help?
Typically, the above steps work out-of-the-box, but some scenarios can cause problems. If your
docker run hello-world
didn’t work and resulted in errors, check out Troubleshooting for quick fixes to common problems.A Windows specific problem you might encounter relates to the NDIS6 host network filter driver, which is known to cause issues on some Windowsversions. For Windows Vista systems and newer, VirtualBox installs NDIS6 driver by default. Issues can range from system slowdowns to networking problems for the virtual machine (VM). If you notice problems, re-run the Docker Toolbox installer, and select the option to install VirtualBox with the NDIS5 driver.
Optional: Add shared directories
By default, Toolbox only has access to the
C:Users
directory and mounts it intothe VMs at /c/Users
.Note: Within the VM path,
c
is lowercase and the Users
is capitalized.If your project lives elsewhere or needs access to otherdirectories on the host filesystem, you can add them, using the VirtualBox UI.
- Open the VirtualBox UI.
- Click the Settings gear, then go to Shared Folders.
- Select any existing listing under Machine Folders, thenclick the + icon.
- Choose the Folder Path on the host, enter the Folder Namefor within the VM (or take the default, which is the same nameas on the host), and configure any additional options you need.
- Choose Auto-mount if you want the folder to automaticallybe mounted into the VM, and choose Make Permanent for itto be considered a permanently shared folder.
- Click OK to add the new folder to the Shared Folders list.
- Click OK again to save your changes and exit the Settings dialog.
Docker Toolbox Download
How to uninstall Toolbox
Removing Toolbox involves removing all the Docker components it includes.
A full uninstall also includes removing the local and remote machines you created with Docker Machine. In some cases, you might want to keep machines created with Docker Machine.
For example, if you plan to re-install Docker Machine as a part of Docker Desktop for Windows you can continue to manage those machines through Docker. Or, if you have remote machines on a cloud provider and you plan to manage them using the provider, you wouldn’t want to remove them. So the step to remove machines is described here as optional.
To uninstall Toolbox on Windows, do the following:
- List your machines.
- Optionally, remove each machine. For example:This step is optional because if you plan to re-install Docker Machine as apart of Docker Desktop for Windows, you canimport and continue to manage those machines through Docker.
- Uninstall Docker Toolbox using Window’s standard process for uninstalling programs through the control panel (programs and features).Note: This process does not remove the
docker-install.exe
file. You must delete that file yourself. - Optionally, remove the
C:Users<your-user>.docker
directory.If you want to remove Docker entirely, you can verify that the uninstall removed the.docker
directory under your user path. If it is still there, remove it manually. This directory stores some Docker program configuration and state, such as information about created machines and certificates. You usually don’t need to remove this directory. - Uninstall Oracle VirtualBox, which is installed as a part of the Toolbox install.
Next steps
Download Docker Toolbox For Mac
- Try out the Get started tutorial.
- Dig in deeper with more tutorials and examples on building images, running containers, networking, managing data, and storing images on Docker Hub.