Below are step-by-step instructions to install Docker on Windows, Linux, and macOS. Additionally, I'll provide links to the official Docker documentation for each platform.
- Ensure that your Windows version is Windows 10 64-bit: Pro, Enterprise, or Education, with Hyper-V support.
- Hyper-V should be enabled in your system's BIOS.
-
Download Docker Desktop for Windows from Docker Hub.
-
Double-click the installer file to start the installation.
-
Follow the installation wizard instructions. It may prompt you to enable Hyper-V and restart your computer during the process.
-
Once the installation is complete, Docker Desktop will start automatically.
-
Verify the installation by opening a command prompt and running the following command:
docker --version docker run hello-world
- Make sure your Linux distribution supports Docker.
- Users need to have sudo privileges.
-
Update the package index:
sudo apt-get update
-
Install Docker dependencies:
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
-
Add Docker's official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg -
Set up the stable Docker repository:
echo "deb [signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
-
Update the package index again:
sudo apt-get update
-
Install Docker:
sudo apt-get install docker-ce docker-ce-cli containerd.io
-
Start and enable Docker service:
sudo systemctl start docker sudo systemctl enable docker -
Verify the installation by running:
docker --version docker run hello-world
- Ensure your macOS version is 10.14 (Mojave) or newer.
-
Download Docker Desktop for Mac from Docker Hub.
-
Double-click the downloaded .dmg file to open the installer.
-
Drag the Docker icon to the Applications folder.
-
Launch Docker from the Applications folder.
-
Once Docker Desktop is running, you will see the Docker icon in your menu bar.
-
Verify the installation by opening a terminal and running:
docker --version docker run hello-world
Make sure to check the official documentation for any updates or additional details that may have been released after my knowledge cutoff date.