This guide provides step-by-step instructions to install Docker on a macOS system.
Ensure your system meets the following requirements:
- macOS must be version 10.14 or newer.
- You have administrative privileges on your macOS system.
If Git is not already installed, follow these steps to install it:
-
Check if Git is installed: Open Terminal and type:
git --version
If Git is installed, you will see the version number. If not, you need to install it.
-
Install Git using Homebrew: If Homebrew is not installed, install it first by running:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Then, install Git:
brew install git
-
Go to the GitHub repository: Open your web browser and navigate to the repository URL.
-
Fork the repository: Click the "Fork" button on the top-right corner of the page. This will create a copy of the repository in your GitHub account.
-
Clone the forked repository: Open Terminal and run the following command, replacing
<your-username>
with your GitHub username:git clone [email protected]:<your-username>/ROS_Software_Assignement.git
Navigate to the cloned repository:
cd ROS_Software_Assignement
- Download Docker Desktop:
- Go to the Docker Desktop for Mac page and click "Download for Mac".
-
Run the Installer:
- Open the downloaded
.dmg
file.
- Open the downloaded
-
Drag Docker to Applications:
- In the installation window, drag the Docker icon to the Applications folder.
-
Start Docker Desktop:
- Go to the Applications folder and double-click Docker to start Docker Desktop.
-
Complete the Setup:
- You might be prompted to enter your password to install a helper tool. Enter your password and proceed with the installation.
- Follow the guided onboarding to complete the setup.
-
Open Terminal:
- Open the Terminal application from the Applications folder or using Spotlight Search.
-
Run the Test Command:
- Verify that Docker is installed correctly by running the following command:
docker --version
- Verify that Docker is installed correctly by running the following command:
-
Run a Test Container:
- Run a test Docker container to ensure everything is set up correctly:
docker run hello-world
This command downloads a test image and runs it in a container. When the container runs, it prints a confirmation message.
- Run a test Docker container to ensure everything is set up correctly:
-
Open Terminal:
- Open the Terminal application.
-
Run Docker Commands:
- You can now run Docker commands directly from the Terminal. For example, to list all running containers, use:
docker ps
- You can now run Docker commands directly from the Terminal. For example, to list all running containers, use:
If you encounter any issues during the installation, here are some common troubleshooting steps:
- Ensure that the Docker Desktop application is running.
- Restart your computer to ensure all changes take effect.
- Check Docker logs for errors: Click on the Docker icon in the menu bar, select "Troubleshoot", and then "Get Support" to view logs.
- Ensure your macOS is updated to the latest version.