Docker Installation Guide
This guide will walk you through the process of installing Docker on your system. Docker is a platform for developing, shipping, and running applications in containers.
Prerequisites
- A 64-bit operating system
- For Windows: Windows 10 64-bit: Pro, Enterprise, or Education (Build 16299 or later)
- For Mac: macOS 10.14 or newer
- For Linux: A 64-bit version of Ubuntu, Debian, Fedora, or CentOS
Installation Steps
For Windows:
-
Download Docker Desktop for Windows from the official Docker website: https://www.docker.com/products/docker-desktop
-
Double-click the installer to run it.
-
Follow the installation wizard instructions.
-
Once installed, start Docker Desktop from the Windows Start menu.
-
You may need to enable virtualization in your BIOS settings if it's not already enabled.
For macOS:
-
Download Docker Desktop for Mac from the official Docker website: https://www.docker.com/products/docker-desktop
-
Double-click the
.dmg
file to open the installer. -
Drag the Docker icon to the Applications folder.
-
Open Docker from the Applications folder.
-
You may be prompted to authorize Docker with your system password.
For Ubuntu:
-
Update your package index:
sudo apt-get update
-
Install packages to allow apt to use a repository over HTTPS:
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
-
Add Docker's official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
-
Set up the stable repository:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
-
Update the package index again:
sudo apt-get update
-
Install Docker CE:
sudo apt-get install docker-ce
Verifying the Installation
To verify that Docker is installed correctly, run the following command in your terminal or command prompt:
docker --version
This should display the installed version of Docker.
Running Your First Container
To test your Docker installation, you can run a simple "Hello World" container:
docker run hello-world
If everything is set up correctly, you should see a welcome message and some additional information about Docker.
Next Steps
- Learn basic Docker commands:
docker ps
,docker images
,docker pull
,docker run
- Explore Docker Hub for pre-built images: https://hub.docker.com/
- Start containerizing your own applications
Remember to consult the official Docker documentation for more detailed information and advanced usage: https://docs.docker.com/