Visit the official Docker website: Get Docker.
- Click on the "Download for Windows" button.
- Follow the on-screen instructions to download the Docker Desktop Installer.
- Once the download is complete, run the installer.
- During the installation process, you may be prompted to enable Hyper-V. Allow this if prompted.
- After installation, Docker Desktop will start automatically.
- You should see the Docker icon in the system tray. Docker is now installed and running on your Windows machine.
- Click on the "Download for Mac" button.
- Follow the on-screen instructions to download the Docker Desktop Installer.
- Once the download is complete, open the Docker.dmg file.
- Drag the Docker icon to the Applications folder.
- Open Docker from the Applications folder.
- You should see the Docker icon in the menu bar. Docker is now installed and running on your macOS machine.
- Click on the "Download for Linux" button.
- Follow the instructions for your specific Linux distribution. Docker provides installation instructions for various Linux distributions like Ubuntu, Debian, Fedora, CentOS, etc.
- After completing the installation steps, start the Docker service.
- On Ubuntu, you can use the following commands:
sudo service docker start - On systems using systemd (e.g., Ubuntu 16.04 and later), you can use:
sudo systemctl start docker - Docker is now installed and running on your Linux machine.
To verify that Docker is installed correctly, open a terminal (Command Prompt on Windows, Terminal on macOS/Linux) and run the following command:
docker --version
You should see information about the Docker version.
Additionally, you can run the following command to verify that Docker is able to run containers:
docker run hello-world
This command downloads a small test image and runs it in a container. If everything is set up correctly, you'll see a "Hello from Docker!" message.