0
0
Dockerdevops~30 mins

Installing Docker - Try It Yourself

Choose your learning style9 modes available
Installing Docker
📖 Scenario: You are setting up a new development environment on your computer. To work with containers, you need to install Docker, a tool that helps you run applications easily inside containers.
🎯 Goal: Learn how to install Docker on your system using command line instructions step-by-step.
📋 What You'll Learn
Use the official Docker installation commands for Ubuntu Linux
Add the Docker repository to your system
Install Docker Engine
Verify Docker installation by checking its version
💡 Why This Matters
🌍 Real World
Installing Docker is the first step to using containers for developing, testing, and deploying applications easily.
💼 Career
Many DevOps and software development roles require Docker knowledge to manage containerized applications.
Progress0 / 4 steps
1
Update package index
Run the command sudo apt-get update to update the package index on your Ubuntu system.
Docker
Need a hint?

Updating package index helps your system know about the latest available packages.

2
Install prerequisite packages
Run the command sudo apt-get install ca-certificates curl gnupg to install packages needed to add Docker's official GPG key.
Docker
Need a hint?

These packages help your system securely download and verify Docker packages.

3
Add Docker's official GPG key and repository
Run these commands to add Docker's official GPG key and repository: sudo mkdir -p /etc/apt/keyrings, curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg, sudo chmod a+r /etc/apt/keyrings/docker.gpg, and echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null.
Docker
Need a hint?

Adding the GPG key and repository lets your system trust and find Docker packages.

4
Install Docker Engine and verify
Run sudo apt-get update again to refresh package index, then install Docker Engine with sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin. Finally, verify installation by running sudo docker --version.
Docker
Need a hint?

Installing Docker Engine lets you run containers. Checking the version confirms success.