What Docker is and which version you need
Docker is software that runs applications inside isolated containers — think of each container as a lightweight virtual machine that holds an application and everything it needs to run. You install Docker once on your computer, then use it to run containers without setting up separate operating systems.
Docker comes in two main versions: Docker Desktop (the easiest route for Windows and Mac users) and Docker Engine (for Linux). Docker Desktop includes a graphical interface and handles the Linux kernel requirement automatically. Docker Engine is the command-line version that runs directly on Linux systems. Both are free to download and use for personal and small business purposes.
Before you start, check your system requirements. Docker Desktop on Windows needs Windows 10 or 11 with at least 4 GB of RAM and virtualization enabled in your BIOS. On Mac, you need macOS 11 or newer and an Intel or Apple Silicon processor. On Linux, you need a 64-bit kernel version 3.10 or newer. If your system does not meet these requirements, you may still run Docker through alternatives like Docker Toolbox, but the standard installation will not work.
Key Takeaways
- Docker Desktop is the standard installation for Windows and Mac; download it from docker.com and run the installer like any other application.
- On Linux, you install Docker Engine through your package manager (apt for Ubuntu/Debian, yum for CentOS/RHEL) rather than downloading an installer.
- After installation, verify Docker is working by opening a terminal or command prompt and typing docker run hello-world.
- Windows users must enable virtualization in BIOS and may need to install WSL 2 (Windows Subsystem for Linux) if Docker prompts you during setup.
- Docker Desktop runs a background service that must be started before you can use containers; on Windows and Mac, this starts automatically when you log in.
Installing Docker Desktop on Windows
Go to docker.com, click the Download button, and select Docker Desktop for Windows. The download is about 500 MB and takes a few minutes depending on your connection. Once the file finishes downloading, double-click the installer and follow the prompts. Docker Desktop will ask where you want to install it — the default location is fine for most users.
During installation, Docker will ask whether you want to use WSL 2 (Windows Subsystem for Linux 2) as the backend. Say yes. WSL 2 lets Docker run Linux containers natively on Windows without a separate virtual machine overhead. If you do not have WSL 2 installed, Docker will prompt you to install it — follow those instructions and restart your computer when prompted.
After installation completes, Docker Desktop will start automatically. You will see the Docker icon in your system tray (bottom right of your screen). If it shows a spinning icon, Docker is starting up — wait a minute or two for it to finish. Once the icon stops spinning, Docker is ready to use.
Installing Docker Desktop on Mac
Visit docker.com, click Download, and choose Docker Desktop for Mac. The download size is about 600 MB. Once the download finishes, open your Downloads folder and double-click Docker.dmg. A window will open showing the Docker icon and an Applications folder. Drag the Docker icon into the Applications folder — this copies Docker to your computer.
Open your Applications folder, find Docker.app, and double-click it to start Docker for the first time. Your Mac will ask for your password because Docker needs permission to install some system components. Enter your password and Docker will finish setting up. This takes a minute or two.
Docker will now run in the background every time you log in. You will see the Docker icon in your menu bar (top right of your screen). Click it to see whether Docker is running — a green dot means it is ready. If you see a spinning icon, Docker is still starting up.
Installing Docker Engine on Linux
On Linux, you install Docker Engine through your package manager rather than downloading an installer. The exact commands depend on your Linux distribution. For Ubuntu and Debian-based systems, open a terminal and run these commands in order:
- sudo apt update — this refreshes your package list
- sudo apt install docker.io — this downloads and installs Docker Engine
- sudo usermod -aG docker $USER — this lets you run Docker without typing sudo every time
- Log out and log back in for the group change to take effect
For CentOS, RHEL, or Fedora, use these commands instead:
- sudo yum install docker — installs Docker Engine
- sudo systemctl start docker — starts the Docker service
- sudo systemctl enable docker — makes Docker start automatically when your computer boots
- sudo usermod -aG docker $USER — lets you run Docker without sudo
- Log out and log back in
After logging back in, Docker is ready to use. Unlike Windows and Mac, Docker Engine on Linux does not have a graphical interface — you control it entirely through the terminal.
Verifying Docker is installed and working
On Windows or Mac, open the terminal (Command Prompt on Windows, Terminal on Mac). On Linux, open your terminal. Type this command and press Enter:
docker run hello-world
Docker will download a small test image and run it inside a container. If everything is working, you will see a message that says "Hello from Docker!" followed by some explanation text. This confirms that Docker installed correctly and can download and run containers.
If you see an error message instead, the most common causes are: Docker is not running (start Docker Desktop on Windows or Mac, or check that the Docker service is running on Linux), or your user account does not have permission to run Docker (on Linux, make sure you ran the usermod command and logged back in). If you see a network error, your computer may not be connected to the internet — Docker needs to download the test image from the internet the first time you run this command.
Troubleshooting common installation problems
If Docker Desktop on Windows says "WSL 2 installation is incomplete", go to microsoft.com/wsl and download the WSL 2 kernel update. Run the installer, restart your computer, and try starting Docker Desktop again. If Docker still will not start, restart your computer a second time — sometimes the changes need two restarts to take effect.
On Mac, if you see an error about "virtualization" or "hypervisor", your Mac may have an older version of macOS. Check your macOS version by clicking the Apple menu and selecting About This Mac. Docker Desktop requires macOS 11 or newer. If you have an older version, you cannot install Docker Desktop through the standard method.
On Linux, if you see a permission error when running docker commands, you skipped the usermod step or did not log out and back in. Run sudo usermod -aG docker $USER again, then log out completely (not just close the terminal) and log back in. If you still see errors, restart your computer.
If Docker starts but docker run hello-world fails with a network error, your firewall may be blocking Docker's connection to the internet. Check your firewall settings and make sure Docker is allowed to access the network. On Windows, Docker Desktop has its own firewall rules — if you see a Windows Defender popup during installation, click "Allow access".
What to do after Docker is installed
Once Docker is running and the hello-world test succeeds, you can start using containers. Docker containers are created from images — pre-built packages that contain an application and its dependencies. You can find images on Docker Hub (hub.docker.com), which is a public repository of thousands of images.
To run a container, use the command docker run [image-name]. For example, docker run nginx will download and run a web server container. Docker will pull the image from Docker Hub the first time you run it, which takes a minute or two depending on the image size. After that, the image is stored on your computer and starts much faster.
You now have Docker installed and ready to use. The next step is learning how to work with containers — how to run them, stop them, view their output, and manage multiple containers. That is beyond the scope of installation, but Docker's official documentation and tutorials cover those topics in detail.
Frequently Asked Questions
Do I need to install Docker if I only want to use containers someone else created?
Yes, Docker itself must be installed on your computer before you can run any containers. Docker is the software that manages and runs containers. Once it is installed, you can run any container image without additional setup.
Can I run Docker on an older computer that does not meet the system requirements?
Standard Docker Desktop and Engine require specific hardware and OS versions. If your computer is older, you may be able to use Docker Toolbox, which is a legacy version that works on older systems, but it is slower and no longer actively maintained. Check the Docker documentation for your specific system before attempting this route.
Does Docker cost money?
Docker Desktop and Docker Engine are free to download and use for personal projects and small businesses. Docker also offers paid plans for larger organizations, but the free version is sufficient for learning and most individual use cases.
What is the difference between Docker Desktop and Docker Engine?
Docker Desktop is a complete package with a graphical interface, designed for Windows and Mac. Docker Engine is the core software that runs on Linux and is controlled through the command line. Both do the same job — run containers — but Docker Desktop is easier for beginners because it handles more setup automatically.
Why does Docker need virtualization enabled in my BIOS?
Docker containers need access to your computer's virtualization hardware to run efficiently. On Windows, this is called Hyper-V or VT-x. If virtualization is disabled in your BIOS, Docker cannot start. You can enable it by restarting your computer, entering BIOS setup (usually by pressing Delete or F2 during startup), and looking for a setting called "Virtualization" or "VT-x" — the exact name and location depend on your motherboard manufacturer.