To install Docker on Windows, follow these steps:
Prerequisites
- Windows Version: Ensure you are using Windows 10 (Pro, Enterprise, or Education) or Windows 11.
- Enable WSL 2: Docker Desktop uses Windows Subsystem for Linux 2 (WSL 2).
Installation Steps
- Download Docker Desktop:
- Visit the Docker Desktop for Windows page.
- Click on the “Get Docker” button to download the installer.
- Run the Installer:
- Locate the downloaded
.exe
file and double-click to run it. - Follow the installation prompts. Make sure to enable the options for WSL 2 and install required components.
- Locate the downloaded
- Set Up WSL 2 (if not already configured):
- Open PowerShell as an Administrator.
- Check if WSL is installed:bashCopy
wsl --list --verbose
- If WSL is not installed, run:bashCopy
wsl --install
- Set WSL 2 as the default version:bashCopy
wsl --set-default-version 2
- Start Docker Desktop:
- After installation, search for “Docker Desktop” in the Start menu and launch it.
- You might be prompted to log in or create a Docker Hub account.
- Verify Installation:
- Open Command Prompt or PowerShell and run:bashCopy
docker --version
- You should see the installed Docker version.
- Open Command Prompt or PowerShell and run:bashCopy
Additional Configuration (Optional)
- Resource Allocation: Right-click the Docker icon in the system tray, select “Settings,” and adjust CPU, memory, and disk space as needed.
Troubleshooting
- Ensure virtualization is enabled in your BIOS settings if you encounter issues.
- Refer to the Docker documentation for additional troubleshooting steps.
You should now have Docker installed and ready to use on your Windows machine!
Howto – Install Docker on Windows