DDEV - Installing Docker

Objectives
  • Describe in broad terms how Docker is generally installed on Linux, macOS, and Windows systems.
  • Compare Docker Engine and Docker Desktop
  • Describe WSL2
Prerequisites
  • None

Overview

DDEV is a cross-platform tool, and can be installed on Linux, macOS, and Windows.

Docker, the container engine underneath DDEV, needs to be installed first. Afterwards you install DDEV, and then you use DDEV to generate, or spin up, individual development environments.

Docker, DDEV, and the tools to manage containers evolve fast and have different requirements depending on your Host operating system (Linux, macOS, or Windows).

We don't have the resources to create and maintain up-to-date installation guides, and we would only be duplicating the excellent information available on the official DDEV and Docker project sites respectively.

Instead, we'll share the need-to-know highlights of the recommended installation process, and point you to the official documentation for full details and different installation scenarios.
 

Docker Engine vs Docker Desktop

Docker Engine and Docker Desktop are both part of the Docker platform, but they serve different purposes.

Docker Engine

Docker Engine (docker-ce) is the core runtime that builds and runs containers. It is the underlying technology that allows you (or rather, DDEV) to build, ship, and run container environments.

Docker engine is free and open source software.

Docker Desktop

Docker Desktop is a collection of tools including Docker Engine and a Graphical User Interface (GUI) to manage Docker environments.

Docker Desktop is available for free for certain types of usage, specifically:

Small businesses with fewer than 250 employees and less than $10 million in annual revenue.

  • Personal use.
  • Education.
  • Non-commercial open source projects.

For any other type of professional use a paid subscription is required.
 

Installing Docker on Linux

Native installation packages are available (and recommended) for Debian, Ubuntu, Fedora, and CentOS. Precompiled binaries are available as well.

  • Do not install Docker Desktop on Linux, as it doesn't play nice with DDEV.
  • Do install using a native installation when possible
  • Do execute the post-linux-installation steps as well. You only need to do this once but it has to be done.

https://ddev.readthedocs.io/en/stable/users/install/docker-installation/#linux
https://docs.docker.com/engine/install/linux-postinstall/ 

Installing Docker on macOS

DDEV recommends 4 possible Docker providers you can use to install Docker:

Orbstack

OrbStack is a new and popular Docker provider. It's a fast, lightweight, and easy to install alternative to Docker Desktop.

It’s a good choice for most users, but it's s not open source and it is not free for professional use.

https://ddev.readthedocs.io/en/stable/users/install/docker-installation/#orbstack 

Colima

Colima is an open source tool that provides a lightweight and performant alternative to Docker Desktop for running Docker containers on macOS systems.

Colima is typically installed using Homebrew, MacPorts, Nix, or pacman. Binaries are available as well.

https://ddev.readthedocs.io/en/stable/users/install/docker-installation/#colima

Docker Desktop

Docker Desktop, developed by the Docker team itself, simplifies the process of setting up Docker and managing Docker environments.

Two recommended methods to install Docker Desktop on macOS are:

  • Homebrew (command-line)
  • Downloading and running the .dmg installer

https://ddev.readthedocs.io/en/stable/users/install/docker-installation/#docker-desktop-for-mac

Rancher Desktop

Rancher Desktop is an open source Docker provider, and is installed by downloading and running the .dmg installer.


https://ddev.readthedocs.io/en/stable/users/install/docker-installation/#rancher-desktop 
 

Installing Docker on Windows

On Windows, the recommended approach is to first install Windows Subsystem for Linux (WSL2), a Microsoft tool that makes it easier to set up Linux environments inside Windows.

For the second step you have two options: installing Docker Engine or Docker Desktop. Both approaches are described here: https://ddev.readthedocs.io/en/stable/users/install/docker-installation/#windows

Option 1: Installing Docker Engine inside WSL2 (recommended)

Installing Docker Engine (docker-ce) is reported to be the most lightweight, performant, and stable option to set up Docker inside Windows.

Option 2: Installing Docker Desktop parallel with WSL2

Docker Desktop provides a nice GUI to manage Docker environments

However:

  • DDEV manages Docker environments for you, so unless you intend to manage non-DDEV Docker environments and want a nice GUI to do so, you don't really need Docker Desktop. 
  • Users have reported performance and stability issues with Docker Desktop + WSL2. Unless you really want to use Docker Desktop, DDEV recommends the Docker Engine inside WSL2 instead. 
     

Activity 1

What is the difference between Docker Engine and Docker Desktop?

Docker Engine is the free, core Docker tool that does all the container work; Docker Desktop is a non-free set of tools that includes Docker Engine and offers a GUI to manage containers.

Hide hints
show hints

Activity 2

What is WSL2?

Windows Subsystem for Linux (WSL2) is a Microsoft tool that makes it easier to set up Linux environments inside Windows.

Hide hints
show hints

Summary

  • You can install Docker on all 3 major platforms: Linux, macOS, and Windows.
  • The stability, performance, and ease of installation depend on your platform, with Linux generally being the most stable, performant, and easy-to-install platform, and Windows the least.
  • Docker Engine is the free, core Docker tool that does all the container work
  • Docker Desktop is a non-free set of tools that includes Docker Engine and offers a GUI to manage containers.
  • Docker Desktop is generally not recommended for use with DDEV, in favour of lighter, more stable, and easier to install alternatives.