Learn how to use PowerShell or Command prompt to install the Docker CLI & Desktop GUI on Windows 11 or 10 for creating Containers to run Virtual machines. You don’t need to visit any website to download the setup manually, everything will be done from the Command Terminal.
Docker is a powerful containerization platform that allows developers to package and distribute applications and their dependencies as lightweight containers. The Docker Command-Line Interface (CLI) is a crucial tool for interacting with Docker and managing containers and images on your system without accessing any GUI. Whereas, those who need some convenience can use the Docker Desktop GUI on Windows. However, it is a necessary step to install Docker first to leverage the full capabilities of it on this operating system
Use Command Prompt to install Docker on Windows 11 or 10
Requirements:
Some system requirements must be fulfilled before you are planning to install Docker Desktop on Windows. Here are those:
- WSL Enabled
- Windows 11 or 10
- Virtual Machine Platform Enabled
Those who have not enabled WSL and VMP, can go to the Windows search box and type “Turn Windows features on or off“. Open it and after that select the “Windows Subsystem for Linux” and “Virtual Machine Platform” options. After that press the OK button both will be on your system.
Step 1: Open PowerShell
As we discussed at the beginning of the tutorial we will use the command line to install Docker Desktop. So, right-click on the Start button and select “PowerShell (Admin) or “Terminal (Admin)”.
Step 2: Check Winget Availablity
On all the latest versions of Windows 11 and 10, Winget is available by default to use. Just like Ubuntu’s APT, Winget is also a package manager by Microsoft to use on Windows for the installation of common applications. Using it we don’t need to visit different websites to download the setup of the apps we want to install, hence saving our time.
To check if it is available, on your PowerShell or CMD, run:
winget
Step 3: Install Docker Dekstop on Windows
Now, in your PowerShell or CMD, run the given command. It will install not only Docker Desktop but also Docker-CLI to manage the containers using the command line.
winget install Docker.DockerDesktop
Soon the Docker Desktop will be installed on your system. After that Restart your system for proper integration of the Docker.
Step 4: Launch Docker Desktop GUI
Go to Windows search and type Docker Desktop, you will see its icon, click that to run the program. The GUI of Docker will appear to manage Images, Containers, Volumes, and with an option to extend the features of Docker by adding various extensions.
Step 5: Access Docker CLI
If you want to create and manage containers but using the command line tool of Windows 11 or 10 such as PowerShell or CMD, then open any of them. Now, on the terminal start using Docker commands. Such as a command to pull a docker image and create a container.
Here is an example:
docker pull hello-world
Docker Version: Check the Docker CLI version installed on your system.
docker --version
Docker Info: Get detailed information about your Docker installation.
docker info
Docker Help: Display a list of available Docker commands and their descriptions.
docker --help
Pull a Docker Image: Download a Docker image from a registry (e.g., Docker Hub).
docker pull image_name:tag
Uninstallation
So far we have discussed the installation but in the future, if you want to remove the Docker Desktop using the command line on Windows then that can be done again using Winget. Here is the command to do that:
winget uninstall Docker.DockerDesktop
Other Articles:
- How to install Cockpit CMS on Docker
- How to Tag existing Docker images
- How to install Docker on Amazon Linux 2023
- How to install Docker using SNAP on Ubuntu Linux
- 2 Ways to start Docker Container automatically on Boot in Linux
Related Posts
How to use the XLOOKUP function in Microsoft Excel with Example
Check the RAM type on Windows 11 or 10. See what DDR RAM you have on your PC in different ways
How to Check Firmware in CMD on Windows 11 or 10
How to Change WIFI or Ethernet MAC address on Windows 11 or 10?
How to Install 7-Zip on Windows 11 or 10 with Single Command
Install Google Earth on Windows 11 or 10 Using a Single Command