Skip to content

Setting Up Docker

Christopher Stevens edited this page Apr 5, 2021 · 6 revisions

On Windows 10 Home

Option One: Docker Desktop

  1. Enable virtualization:

    1. Go to settings -> turn windows features on or off
    2. Check Virtual Machine Platform and Windows Hypervisor Platform
    3. You may need to enable virtualization in BIOS - how to do this will depend on your PC
  2. Enable Hyper-V components

    1. Open a text editor and save the following as hyper-v_install.bat:

      pushd "%~dp0" dir /b %SystemRoot%\servicing\Packages*Hyper-V*.mum

      hyper-v.txt for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages%%i" del hyper-v.txt Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL pause

    2. Right click -> run as administrator. It will prompt you to reboot at the end, say yes.

  3. The Docker installer should just check for whether that feature is enabled, but instead it checks what version of Windows you're running. We will circumvent this lazy check with a lazy settings change. The next step is to temporarily change the Windows version registry entry:

    1. Type Win-R to bring up the run window
    2. Type in regedit.exe and hit enter
    3. Navigate to \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
    4. Change EditionID from Core to Professional
  4. Log in (create an account if necessary) and download the installer for Docker for Windows

  5. Run the installer. If it says you need Windows Professional, something went wrong in a previous step. Check this forum post for advice on fixing it. Leave the box for creating windows containers unchecked.

  6. Follow the steps in 3 again to change EditionID back to Core.

  7. [Optional] set up ubuntu to interface with docker for windows

Option Two: Ubuntu for Windows

  1. Go to settings -> turn windows features on or off and Check Windows Subsystem for Linux.
  2. Go to the Windows store and install Ubuntu
  3. Follow instructions to run docker within Ubuntu. This is slower than following the Option One instructions and setting up ubuntu to talk to Docker for Windows.

On Mac OS

  1. Download Docker Desktop directly from the website.

    1. As of Feb 2021, if you have an Apple Silicon Mac, you will need to use a separate beta version.
    2. To figure out if you have an Apple Silicon Mac or not, visit this page on Apple support.
  2. Open the Terminal. Run xcode-select --install to download and install the Command Line Tools, which are required to use Docker.

  3. Open the Docker Desktop app by clicking on it.

    1. If it endlessly loads, try disabling the Apple Firewall. You can do this by going to System Preferences -> Security and Privacy. In the Firewall tab, you can either disable the firewall completely or go to "Firewall Options." There, you want to uncheck the box next to "Block all incoming connections," if it is checked.
  4. When Docker is ready, the whale icon in your top menu bar will stop blinking and clicking on it will show "Docker Desktop is running."

As tested on a M1 MacBook Pro running Big Sur 11.1