Photo by Kaitlyn Baker on Unsplash
Docker Tutorial Series: Part 2
In part 2 of this series for Docker, you will learn about Docker installation on macOS and Windows.
4 min read
What is Docker Desktop for macOS and Windows?
Docker Desktop for macOS and Windows is the fastest way to containerize applications. Docker is primarily a Linux technology, and initially, there was no support for other operating systems, such as Windows and macOS. The Docker team realized the issue, and as an outcome, Docker Desktop for macOS and Windows was born.
From the official documentation:
Docker Desktop is an application for macOS and Windows machines for the building and sharing of containerized applications and microservices.
You could think of it as an IDE but for your containers. Since containers are natively not supported on Windows and Mac, Docker Desktop creates lightweight VMs. To create VMs On Windows, it uses Hyper-V(WSL2 recommended) and Hyperkit on macOS. Docker Desktop provides you with a GUI to manage resources for this VM.
The good thing about Docker Desktop is that you set up everything you need to use Docker by using a single package for Mac and Windows.
A typical Docker Desktop installation includes the following components:
Don't stress yourself. We will talk about these components in the upcoming blogs.
Let's talk about some of the critical features that Docker Desktop provides.
Docker Desktop Features
Following are some of the key features.
Easily containerize and share your applications.
Ability to scan images for potential vulnerabilities.
Simplified UI to manage Docker components.
Docker Desktop supports multiple system architectures (i.e., Apple M1, ARM, Windows).
Provides features like Dev Environments to set up repeatable and reproducible development environments.
Built-in support for Kubernetes. You spin up a single-node functional Kubernetes cluster on your local machine using Docker Desktop.
Extend functionalities using third-party tools powered by Docker extensions.
Capability to run on Linux natively on Windows using WSL2.
We have some basic understanding of Docker Desktop, so in the next section, we will go through the steps of installing Docker on macOS and Windows.
Installing Docker Desktop on macOS
To install Docker Desktop on macOS, follow these steps:
Go to the Docker website (docker.com/products/docker-desktop) and download the Docker Desktop for Mac installer.
Once the download is complete, double-click the downloaded .dmg file to open it.
Drag the Docker Desktop icon to the Applications folder to install it.
Open Docker Desktop from the Applications folder. You should see the following screen.
That's it! Docker Desktop should is now installed and ready to use on your Mac.
Installing Docker Desktop on Windows
Following are the steps to install Docker Desktop on Windows:
Go to the Docker website at docker.com/products/docker-desktop and click the "Download Docker Desktop for Windows" button. It will download the installation file.
Once the download is complete, double-click the installation file to start the installation process. If prompted, allow the installer to make changes to your device.
Follow the instructions in the Docker Desktop installation wizard. You can choose the default options unless you have specific requirements.
During the installation, Docker may prompt you to enable features such as Hyper-V and Windows Subsystem for Linux (WSL). Make sure to allow these features if prompted.
After the installation is complete, Docker will launch automatically. You should see the Docker icon in your system tray.
Click on the Docker icon in the system tray and select "Settings." From there, you can configure your Docker environment, such as specifying the number of CPUs and memory that Docker can use.
To test your Docker installation, open a command prompt or PowerShell terminal and run the following command:
docker run hello-world
This will download and run a sample Docker image, and you should see a message indicating that Docker is working correctly.
That’s about it. Following the steps outlined in this blog, you can quickly and easily install Docker and take advantage of its many benefits. We will learn more about Docker-related concepts and terminologies in the next blog.
Did you find this article valuable?
Support Ashish Choudhary by becoming a sponsor. Any amount is appreciated!