Introduction
Docker has revolutionised how we build, share, and run applications by simplifying the use of containers. For Windows 11 users, installing it allows you to leverage its powerful platform to develop and test applications in a highly efficient and scalable way.
This blog post provides a detailed guide on installing Docker on Windows 11, setting the stage for your containerisation journey.
System Requirements
Before installing Docker, ensure your Windows 11 system meets the following requirements:
- Windows 11 64-bit: Pro, Enterprise, or Education edition.
- Hardware Virtualisation must be enabled in BIOS.
- At least 4GB RAM.
Enable WSL 2
Windows Subsystem for Linux version 2 (WSL 2) is a prerequisite for running Docker Desktop on Windows 11:
- Open PowerShell as Administrator and run:
wsl --install
- Restart your computer when prompted.
Enabling WSL2 on windows does quite a few things. It installs a virtual machine platform, the subsystem for windows and installs Ubuntu too. This can take a little while depending on your internet speed and that of your machine. I installed mine on a Windows 11 VM running under Parallels on an Apple MacBook Pro. So it was installed as a machine, in a virtual machine, in another virtual machine running on a Mac.
Download and Install Docker Desktop
- Download Docker Desktop for Windows from the official Docker website.
- Run the Installer: Once downloaded, double-click the installer and follow the instructions.
- Configuration: During installation, ensure the “Enable WSL 2 Windows Features” option is selected. Docker Desktop will use WSL 2 as its default backend.
Configuration and Verification
- After installation, launch Docker Desktop. You may be asked to log out and log back in, or to restart your system.
- Verify the Installation: Open a command prompt or PowerShell, and run:
docker --version
This command should return the Docker version, confirming that Docker has been installed successfully.
Running Your First Container
To test your Docker installation, you can run a simple Hello World container:
- Open your command prompt or PowerShell.
- Run:
docker run hello-world
- Docker will download the Hello World image and run it. You should see a message indicating that your installation is working correctly.
Enable Kubernetes (Optional)
Docker Desktop for Windows includes a standalone Kubernetes server that runs on your Windows machine, allowing you to test deploying your workloads on Kubernetes.
- Open settings.
- Go to the Kubernetes tab.
- Check “Enable Kubernetes”.
- Click “Apply & Restart”.
Conclusion
Installing Docker on Windows 11 is a straightforward process that opens up a world of possibilities for developing and testing applications in isolated environments.
Whether you’re a developer, system administrator, or just a tech enthusiast, it offers tools to build, deploy, and manage your applications with ease.
With it now installed on your Windows 11 machine, you’re well on your way to exploring the vast ecosystem of containers and the efficiencies they offer.
Happy Dockerising!