Welcome! This guide will walk you through the process of installing Docker on various platforms, setting up Docker Desktop, and running your first container.
Installing Docker on Windows, macOS, and Linux
Docker is available on all major operating systems. Follow the instructions below for your platform:
Windows
- Download Docker Desktop for Windows.
- Run the installer and follow the prompts.
- Ensure that the "Use WSL 2 instead of Hyper-V" option is selected during installation.
- Restart your computer when prompted.
macOS
- Download Docker Desktop for macOS.
- Open the downloaded `.dmg` file and drag Docker to the Applications folder.
- Launch Docker and complete the setup process.
Linux
On Linux, you'll install Docker Engine:
- Update your package index:
- Install Docker with the following commands:
- Enable and start Docker:
sudo apt update
sudo apt install docker.io
sudo systemctl enable docker
sudo systemctl start docker
Setting Up Docker Desktop
After installing Docker Desktop, follow these steps:
- Open Docker Desktop from your Applications or Start menu.
- Sign in with your Docker Hub account (or create one here).
- Verify that Docker is running by checking the Docker icon in your taskbar or menu bar.
Running Your First Container
Let’s test Docker by running a simple container:
- Open a terminal or command prompt.
- Run the following command to pull and start a test container:
- If everything is set up correctly, you will see a message confirming that Docker is working.
docker run hello-world
Conclusion
Congratulations! You’ve successfully installed Docker, set up Docker Desktop, and run your first container. You’re now ready to start exploring Docker’s powerful features.
0 Comments