Setting Up a Docker Environment

Guide to Choosing the Right Docker Release for Your OS

As a cross-platform application container runtime, Docker CE (Community Edition) can be installed on Windows, MacOS and Linux on your laptop, in the cloud or on a bare metal server. Depending on which operating system you’re running, if you use Windows in addition to Linux containers, and what other hypervisors are on your system, you will install Docker using a different method.

If you are on Windows or Mac, it is recommended to use Docker for Windows or Docker for Mac unless you don’t meet the system requirements. These apps use the VM hypervisor native to each operating system (Hyper-V or HyperKit) and include a background process that automatically updates your Docker Engine to the latest version.

Docker for Windows screenshotOnce you have installed Docker for Windows or Docker for Mac, you can use any shell on your system, whether it’s Powershell, Command Prompt or Terminal to issue docker commands. There’s also a GUI you can access from your system tray (Windows) or menu bar (Mac) for configuring:

  • Automatic startup and updates
  • Shared drives
  • CPUs/Memory allocated to Docker VMs
  • Network and proxy settings
  • Insecure registries and registry mirrors

As an alternative, you would use the legacy solution – Docker Toolbox. Docker Toolbox is an all-in-one installer that uses Docker Machine to spin up a VirtualBox VM, and generates a key for the Docker Quickstart Terminal (CLI) and Kitematic (GUI) on your host machine to communicate with the Docker Engine.

On the contrary, Docker for Windows and Docker for Mac do not use Docker Machine because they manage and update the VM directly, instead of provisioning it via the VirtualBox driver. The current (non-Toolbox) implementations of Docker have also spun out Kitematic, a desktop app used to discover and manage containers, into a separate download.

Understanding the Docker Release Cycle

Stable vs Edge Releases

In early 2017, Docker switched over to a versioning nomenclature like the one used by Canonical, the developers of Ubuntu. The major version number (17.07.0) represents the year of release, minor version number (17.07.0) is the month of release, and the final digit (17.07.0) is for indicating bug fix releases.

Stable releases come out quarterly, and Edge releases come out monthly. When you install Docker for Windows or Mac, or add the repository to your Linux distribution, you can select the Stable or Edge channel depending if you are running in production, or testing the latest features.


Docker for Windows

Windows 10 Pro/Enterprise
Virtualization engine: Microsoft Hyper-V

Windows Server 2016 is officially supported in Docker EE (Enterprise Edition).

Docker running Windows Containers

  • Switch between running Linux and Windows containers.
  • Linux Docker Engine installed in an Alpine Linux VM; Windows Containers leverage containers support in Windows 10.
  • Hyper-V must be enabled – must not be using VMware or VirtualBox
  • Execute docker commands from Powershell or Command Prompt. No need to manually add environment variable.
  • Background app automatically checks for updates to Docker components
Docker Toolbox (Windows)

Windows 10 Home, Windows 7, Windows 8/8.1
Virtualization engine: Oracle VirtualBox

  • Docker Engine runs inside a VirtualBox Linux VM
  • Supports Linux containers only, not Windows containers
  • If VirtualBox is not present on the system, it can be installed by the Toolbox.
  • Execute docker commands from Command Prompt after adding C:\Program Files\Docker Toolbox to the Environment PATH variable.
  • Manage containers from Docker Quickstart Terminal or Kitematic
  • Check for updates by running Toolbox installer


Docker for Mac

OS X El Capitan 10.11 or greater
2010 or newer Mac, with minimum 4 GB RAM
Virtualization engine: HyperKit

Docker for Mac screenshot

  • Mac-native application that installs directly in your Applications folder
  • Generally better performance, compatibility with system time and power settings
  • Docker Engine runs in an Alpine Linux VM virtualized in HyperKit
  • Can run in parallel with VirtualBox version 4.3.30 or greater
  • Execute docker commands from Terminal. No need to manually add environment variable.
  • Background app automatically checks for updates to Docker components
Docker Toolbox (Mac)

Virtualization engine: Oracle VirtualBox

Docker Toolbox (Mac) Terminal and Kitematic Apps

  • Docker Engine runs in a VirtualBox Linux VM
  • Execute docker commands from Terminal after adding the following environment variable: eval $(docker-machine env default)
  • If VirtualBox is not present on the system, it can be installed by the Toolbox.
  • Check for updates by running Toolbox installer


Ubuntu, Debian, Fedora or CentOS

Recommended install method:
Native apt or yum Linux package from Docker’s official repositories.

Why shouldn’t you install Docker from your OS’ default repositories? The versions are much out-of-date compared to Docker’s Stable release, and you won’t have access to Edge versions for testing.

Docker install for Ubuntu
Docker install for Debian
Docker install for Fedora
Docker install for CentOS

Red Hat Enterprise Linux (RHEL), SUSE Linux Enterprise Server and Oracle Linux are officially supported by Docker EE.

  • No virtualization – best performance for running Linux containers in production
  • File system mounts (container <-> host) do not have overhead of a hypervisor
  • Add Docker’s repository and GPG key to download binaries over HTTPS
  • Docker can be updated to the latest version or held back via package manager
  • Docker Engine installed separately from Docker Compose (How to install Docker Compose on Linux)
  • Issue docker commands from any shell. Current user needs to be added to docker user group to run docker commands without sudo.