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.
Sep 13, 2017 When GA, Docker Linux containers on Windows will improve the Docker Linux container experience for both Windows developers and server administrators. Developers will be able to more easily build and test mixed Windows/Linux Docker applications by running containers for both platforms side-by-side on the same system. Assuming you install Docker Toolbox on Windows, both docker and docker-machine commands will be available. Often, people get confused when to use either of these. The docker commands are used only within a virtual machine to manage images. The docker-machine commands are used on the host to manage the Linux VMs. May 10, 2016 This does not mean you can’t use Docker you just can’t use the Hyper-V version of it but you can use the VirtualBox version. The issue where your Task Manager is showing Vritualisation is Disabled is something that is enabled in your computer BIOS (UEFI likely) on boot up of your laptop. If you’ve ever tried to install Docker for Windows, you’ve probably came to realize that the installer won’t run on Windows 10 Home.Only Windows Pro, Enterprise or Education support Docker.
Docker For Windows Virtualbox Bootable. This indicates that your Docker installation is successful. Docker Toolbox For Windows Step 4: Run Bitnami WordPress in Docker. Now that Docker is running, the next step is to use it with a Bitnami application. This guide will use the Bitnami WordPress Docker image. Getting Started with Docker. Take a walkthrough that covers writing your first app, data storage, networking, and swarms, and ends with your app running on production servers in the cloud. Can I install Docker Desktop on Windows 10 Home? What are the system requirements for Docker Desktop? That’s because Docker for Windows uses Hyper-V which is a type 1 hypervisor where as VirtualBox and VMWare are type 2 hypervisors. Just having Hyper-V activated will prevent VirtualBox and VMWare from being able to start a VM (even if Docker for Windows is stopped). The scenario is mostly around being able to use WSL2 and Docker on the Windows 10 host machine while you provision VMs (preferably with VirtualBox) provisioned via Vagrant. This issue took me a couple of hours to figure out and I wanted to share a bit of the steps and issues I’ve seen.
First steps with provisioning of Docker containers using Vagrant as provider Vagrant and Docker – Next and Advanced steps with folders, ports, volumes, linking and more Vagrant and Docker followed by Puppet to provision complex environments Vagrant, Docker, VirtualBox and the Graphical Desktop for GUI applications in Docker Containers Reflections after Oracle OpenWorld 2015.
Docker supports Docker Desktop on Windows for those versions of Windows 10 that are still within Microsoft’s servicing timeline. What’s included in the installer The Docker Desktop installation includes Docker Engine, Docker CLI client, Docker Compose, Notary, Kubernetes, and Credential Helper.
Quick Jump: OS and Hardware RequirementsPros and ConsWhich One Should I Use?
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 Mojave 10.14+ or newer with an Intel CPU. M1 support is on its way.
You can run VirtualBox 6+ alongside Docker Desktop. 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)
Docker Virtualbox Windows 10 Home
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 thanks to WSL 2.
As of August 2020, Microsoft enabled WSL 2 support for Windows 10 builds 1903 + 1909.
For years prior to that you could only run it on Windows Pro, Enterprise or any edition that had Hyper-V available, but since August 2020 pretty much all supported versions of Windows 10 can use Docker Desktop.
Docker For Windows Virtualbox Recovery Tool
You can also run VirtualBox 6+ alongside Docker Desktop too in case you have older projects using VirtualBox (perhaps with Vagrant too).
Prior to mid-2020 this was still a reasonable way to run Docker on machines that couldn’t run Docker Desktop, but that’s no longer the case.
It’s now considered legacy and as of late 2020 it’s been officially deprecated.
Unless you’re using unsupported versions of Windows or have a really really ancient Mac you shouldn’t need to ever use this tool.
But if you’re in a pinch and you absolutely must use it, technically it’s still available at https://github.com/docker/toolbox/releases, but it’s no longer maintained by Docker.
Your own Virtual Machine
Docker will happily run inside of VirtualBox, VMWare Workstation or any other Type 1 / 2 Hypervisor that’s running a major distribution of Linux as a guest OS.
If for whatever reason you can’t use Docker Desktop then this solution would be better than using Docker Toolbox since you can install supported versions of Docker and you have full control over the environment.
Pros and Cons
Now for the good stuff!
Docker for Mac / Docker for Windows (Docker Desktop)
Offers the most “native” experience, you can easily use any terminal you you want since Docker is effectively running on
localhostfrom macOS / Windows’ POV.
Docker is heavily developing and polishing this solution.
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.
- Offers an “out of the box” Docker experience if you have no other choice.
It’s deprecated by Docker and will receive no future maintenance.
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:
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 / 8 or an older version of Windows 10 like 1809.
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.
Stuck on an Old Version of Windows and Like Linux?
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 modern versions of 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.
Docker For Windows Virtualbox Usb
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).
Docker For Windows Use Virtualbox Instead Of Hyper-v
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.
Docker For Windows And Virtualbox
Are you using the Docker Toolbox, Docker for Mac / Windows or your own VM?
Docker for Windows uses Hyper-V. Having Hyper-V installed prevents you from running VirtualBox or VMWare VMs. Here's a workaround.
Docker For Windows Inside Virtualbox
If you’re using Docker on Windows and have Windows 10 Pro then you’re probably using Docker for Windows as it’ll provide you the best Docker experience out of the box.
But you’ve probably noticed that you can’t run VirtualBox or VMWare anymore. That’s because Docker for Windows uses Hyper-V which is a type 1 hypervisor where as VirtualBox and VMWare are type 2 hypervisors.
Just having Hyper-V activated will prevent VirtualBox and VMWare from being able to start a VM (even if Docker for Windows is stopped).
You would have to uninstall Docker for Windows and disable Hyper-V to run VirtualBox, but there is another way. It’s not the best solution ever, but it’ll work in the end. If you need to support legacy VM based applications then a working solution is all you need.
It involves creating a second boot option and then rebooting every time you need to access your legacy VM. I learned about this when one of my Dive Into Docker students asked if there’s a way to run both together. I made it my life’s mission to find a solution.
Here’s what you need to run from a command prompt to enable this solution:
This strategy was originally found on Scott Hanselman’s blog. Thanks for the solution Scott!
When you’re ready to make the switch:
- Goto your start menu
- Click the power button
- Hold down the Shift key
- Select the “restart” option and reboot
At this point you’ll be presented with a menu where you can choose “Use another operating system”. Then simply pick the “No Hyper-V” option that we made before and voila, you can start VirtualBox or VMWare up like normal without having to uninstall Docker for Windows.