Docker: Mac/Linux
The best way to install Docker for Mac and Linux is by using Docker Desktop
(for Mac) and Docker Engine (for Linux). Docker provides a complete development
environment for containerized applications.
Warning: Docker is a resource-intensive application that may consume a significant amount of disk space, memory, and CPU resources. Installing and running Docker on your system may slow down your machine, especially if it has limited resources. Make sure your system meets the minimum requirements before installing Docker, and consider monitoring resource usage to ensure optimal performance.
Follow these steps to install Docker on Mac and Linux.
For Mac:
Ensure your system meets the requirements:
- macOS 10.14 (Mojave) or later
Download Docker Desktop for Mac from the official Docker website.
Run the installer:
- Double-click the downloaded Docker Desktop Installer.dmg file and follow the on-screen instructions.
Start Docker Desktop:
- After the installation is complete, Docker Desktop should start automatically. If it doesn’t, you can launch it from the Applications folder.
- You will see the Docker icon in the menu bar, indicating that Docker is running.
Verify the installation:
- Open a Terminal window.
- Run the following command to check the Docker version.
docker --version
Run a test container to ensure that Docker is working correctly.
docker run hello-world
For Linux:
Choose the appropriate installation instructions for your Linux distribution from the official Docker Engine documentation.
Follow the provided instructions to install Docker Engine on your system.
Verify the installation.
- Open a Terminal window.
- Run the following command to check the Docker version.
docker --version
Run a test container to ensure that Docker is working correctly.
docker run hello-world
Save Resources
Docker takes a lot of resources.
You may want to stop Docker when you are not using it.
For Mac
- Locate the Docker icon in the menu bar, which is typically located in the upper-right corner of the screen.
- Click on the Docker icon to open the dropdown menu.
- Click on “Quit Docker Desktop” or “Exit” to stop Docker Desktop.
For Linux
- Open a Terminal window.
- Run the following command to stop the Docker daemon.
sudo systemctl stop docker
To start Docker again, simply launch the application from the Applications folder (Mac) or run the following command in a Terminal window (Linux):
sudo systemctl start docker
Docker: Windows
The best way to install Docker for Windows is by using Docker Desktop.
Docker Desktop is an easy-to-use application that allows you to run
containers on your Windows machine. It includes both Docker Engine and Docker
Compose, providing a complete development environment for containerized applications.
Warning: Docker is a resource-intensive application that may consume a
significant amount of disk space, memory, and CPU resources.
Installing and running Docker on your system may slow down your machine,
especially if it has limited resources. Make sure your system meets
the minimum requirements before
installing Docker, and consider monitoring resource usage to ensure optimal performance.
Follow these steps to install Docker Desktop for Windows.
- Ensure your system meets the requirements:
Windows 10 64-bit: Pro, Enterprise, or Education (Build 16299 or later) or Windows 11.
Virtualization must be enabled in the BIOS. You can usually find this setting under “CPU Configuration,” “Virtualization,” or “VT-x” settings.
Download Docker Desktop for Windows from the official Docker website. (600+ MB).
Run the installer:
- Double-click on the downloaded Docker Desktop Installer.exe file to start the installation process.
- Follow the on-screen instructions, accepting the default settings or customizing them as needed.
- Start Docker Desktop:
- After the installation is complete, Docker Desktop should start automatically.
- If it doesn’t, you can launch it from the Start menu.
- You will see the Docker icon in the system tray, indicating that Docker is running.
- Right-click on the icon and select “Dashboard” to open the Docker Desktop dashboard.
- Verify the installation:
- Open a command prompt or PowerShell window.
- Run the following command to check the Docker version.
docker --version
- Run a test container to ensure that Docker is working correctly.
docker run hello-world
Save Resources
To stop Docker Desktop when you are not using it:
Locate the Docker icon in the system tray, which is typically located in the lower-right corner of the screen.
Right-click on the Docker icon to open the context menu.
Click on “Quit Docker Desktop” or “Exit” to stop Docker Desktop.