Monthly Archives: June 2026
Sample Chapter – Desktop Docker
Using WordPress on AWS Lightsail and Docker
Summary
For Local Docker Development. We could use Docker Engine, which is the primary container runtime that runs directly on Linux and Windows servers. It is built for production use because it is lightweight, stable, and can be automated with command-line tools, system services, and CI/CD pipelines. This setup provides the performance and control necessary to run applications at scale. On the other hand, Docker Desktop is meant for development on macOS, Windows, and Linux desktops. It includes Docker Engine inside a small virtual machine and adds a graphical dashboard, resource controls, Docker Compose, and optional Kubernetes for local testing. In short, Docker Engine runs containers in production, while Docker Desktop provides the developer with an easy way to build, test, and debug containers locally before deploying them to production.
We will install Docker Desktop for our development work on either Windows, Linux, or macOS.
Installing Docker Desktop
Windows 11 or higher
1. Prerequisites
Before installing Docker Desktop on Windows:
Windows Version:You need Windows 11 or a newer version. Docker Desktop uses Hyper-V and WSL2.Hardware Requirements:Your system must support virtualization technology enabled in BIOS. Docker Desktop for Windows requires at least 4GB RAM and recommends SSD storage for optimal performance.Licensing:Docker Desktop is free for individuals, education, and small businesses (< 250 employees or < $10 million revenue). Large enterprises need a paid plan.
2. Install WSL2:
-
- Open PowerShell as an Administrator, then enter the following command.
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
This enables the core WSL feature on your system.
-
- Enable Virtual Machine Platform
WSL 2 requires the Virtual Machine Platform feature to run the Linux kernel:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
-
- Set WSL 2 as the Default Version
wsl --install
wsl --set-default-version 2
If prompted, please reboot your system and launch Ubuntu from the Microsoft Store once to complete the setup.
3. Download and install Docker Desktop for Windows.
1. Install via GUI (Recommended for Most Users) – Download Manually
The simplest and most popular way to install Docker Desktop on Windows 11 or higher is described here.
Go to the official download page:
Install Docker Desktop on Windows
-
- Click
Download Docker Desktop for Windows.
- Click
-
- Save the file (for example, Docker Desktop Installer.exe).
-
- Double-click the installer to start setup.
2. Curl with CMD or Powershell
Below is a single CMD command to download and silently install Docker Desktop with the WSL 2 backend. Please run as Administrator.
curl -L "https://desktop.docker.com/win/main/amd64/Docker%%20Desktop%%20Installer.exe" -o "%TEMP%\DockerDesktopInstaller.exe" && start /w "" "%TEMP%\DockerDesktopInstaller.exe" install --accept-license --quiet --backend=wsl-2
3. Chocolatey
To install Docker Desktop on Windows using Chocolatey, run the following, Open PowerShell as Administrator and run:
1. Check if Chocolatey is installed
choco -v
If a version number, such as 2.2.2, appears, the process is complete. If not, please install it using the following command:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
2. Install Docker Desktop
choco install docker-desktop -y
chocoChocolatey command-line tool.installChecks for a lastest version of the package and installs it.docker-desktopThe name of the Docker Desktop package.-yautomatically accepts prompts.
3. Update Docker Desktop
choco upgrade docker-desktop -y
`
chocoChocolatey command-line tool.upgradeChecks for a newer version of the package and installs it.docker-desktopThe name of the Docker Desktop package.-yautomatically accepts prompts.
Install on macOS
1. Prerequisites
Before installing Docker Desktop on macOS:
MacOS VersionRequires macOS Monterey (12) or newer.Hardware RequirementsYou need an Intel or Apple Silicon (M1, M2, M3, or newer) CPU, at least 4 GB of RAM, and 2 GB of free disk space.VirtualizationMake sure Rosetta 2 is enabled for Apple Silicon, or Hypervisor Framework is enabled for Intel.LicensingSame free-tier rules apply as Windows.
Docker Desktop for macOS can be installed in three ways:
1. Install via GUI (Recommended for Most Users)
-
- Download Installer – Visit the official Docker Desktop for Mac download page Install Docker Desktop on Mac.
-
- Choose the correct version and download:
-
- Open the Installer
- Double-click the downloaded .dmg file.
- Drag the Docker.app icon into the Applications folder.
- Open the Installer
-
- Launch Docker Desktop
- Open Applications folder and launch Docker.app.
- The first time you open the program, you might be asked to enter your system password.
- Wait for the whale docker icon to appear in the macOS status bar.
- Launch Docker Desktop
2. Using Homebrew (Command Line Install) Homebrew
Homebrew is a package manager for macOS that simplifies installing applications from the command line.
-
- Open the Terminal App, in Terminal run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
- Once installed, verify:
brew --version
-
- Install Docker Desktop via Homebrew
Homebrew downloads and installs the latest version of Docker Desktop that works with your Mac�s architecture, whether it is Intel or Apple Silicon.
brew install --cask docker
-
- Once the installation is complete, open Docker Desktop. Wait until you see the whale Docker icon in the macOS status bar.
open /Applications/Docker.app
3. Using Mac App Store (Apple Silicon only)
-
- Open the Mac App Store
-
- In the top-left corner of the App Store window, click the Search bar.
-
- Type Docker Desktop and press Return.
-
- You should see the official app listed as Docker Desktop Developer Tools by Docker Inc.
-
- macOS will automatically download and install Docker Desktop in your Applications folder. Please wait until the download finishes.
-
- Once the installation is complete, open Docker Desktop. Wait until you see the whale Docker icon in the macOS status bar.
open /Applications/Docker.app
Install on Linux (Ubuntu 24.04)
-
- Add Official Docker Repository
Before you install Docker Desktop, you need Docker’s CLI and daemon packages to be available through its official repositories
Open a terminal (Ctrl+Alt+T) and run the following:
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg -y
These packages enable HTTPS access to repositories and manage trusted keys.
Now, import the Docker GPG key and add the official Ubuntu repo:
sudo apt install apt-transport-https ca-certificates curl gnupg
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu noble stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Then update your package index:
sudo apt update
-
- Download the Docker Desktop .deb Package
Docker Desktop for Linux comes as a .deb file. To get the latest version, you can use curl
curl -fsSL -o docker-desktop.deb https://desktop.docker.com/linux/main/amd64/docker-desktop-latest.deb
-
- Install Docker Desktop
After you download the package, use apt to install it. This will make sure all the needed dependencies are installed automatically.
sudo apt install ./docker-desktop.deb
This process installs Docker Desktop and its main components, such as:
* Docker Engine
* Docker CLI (docker command)
* Docker Compose
* Docker Desktop system service
-
- Enable User Access to Docker
If you want to run Docker commands without using sudo, add your user to the docker group. The newgrp command lets you apply your group changes right away, so you do not need to log out first.
sudo usermod -aG docker $USER
newgrp docker
`
-
- Launch Docker Desktop
Now you can start Docker Desktop with
systemctl --user start docker-desktop
`
Verify Docker Desktop Installation
-
- Start Docker Desktop
Windows:Find “Docker Desktop” in the Start Menu and open it. You should then see the Docker whale icon in the system tray.Mac:Open your Applications folder, find “Docker Desktop,” and start it. The Docker whale icon will show up in the menu bar.Linux (Ubuntu 24.04):The location and icon for launching Docker Desktop can vary depending on your Linux distribution. Check your distribution’s documentation or search for “Docker Desktop” in your application launcher for more information.-
- Verify Docker Engine and Client
Open your terminal, command prompt, then run this command.
docker --version
This command shows the version of the Docker client and engine, so you can check that Docker is installed and working from your command line.
-
- Run a Test Container
Execute the “hello-world” container to verify that Docker can pull images, create and run containers, then run this command.
docker run hello-world
If the process works correctly, you will see a message
Hello from Docker!
This message shows that your installation appears to be working correctly.
This confirms that the Docker engine, container networking, image pulling, and runtime execution are functioning correctly.

You must be logged in to post a comment.