How to Install Docker on Ubuntu (2025 Guide)
sam

sam @sam123253

About: Vultr is a global cloud infrastructure platform designed to make high-performance cloud computing accessible and affordable for developers, businesses, and enterprises.

Joined:
Jul 15, 2025

How to Install Docker on Ubuntu (2025 Guide)

Publish Date: Jul 15
0 0

If you're a developer or system administrator working on containerized applications, learning how to install Docker on Ubuntu is essential. Docker is a powerful tool that allows you to build, deploy, and manage applications in lightweight containers—making development faster and more efficient.

In this guide, we’ll show you how to install Docker on Ubuntu step-by-step in 2025, covering Ubuntu 20.04, 22.04, and the latest versions.

✅ Why Use Docker?
Portability: Run your app anywhere.

Efficiency: Uses fewer resources than virtual machines.

Scalability: Ideal for microservices and CI/CD pipelines.

Community Support: Massive ecosystem of images and tools.

📋 Prerequisites
A server or system running Ubuntu

Sudo or root access

Internet connection

🔧 How to Install Docker on Ubuntu (Step-by-Step)

  1. Update the system bash Copy Edit sudo apt update && sudo apt upgrade -y
  2. Install dependencies bash Copy Edit sudo apt install ca-certificates curl gnupg lsb-release -y
  3. Add Docker’s official GPG key bash Copy Edit sudo install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \ sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
  4. Set up the Docker repository bash Copy Edit 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
  5. Install Docker Engine bash Copy Edit sudo apt update sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
  6. Enable and start Docker bash Copy Edit sudo systemctl enable docker sudo systemctl start docker
  7. Verify Docker installation bash Copy Edit docker --version 👥 (Optional) Run Docker Without Sudo bash Copy Edit sudo usermod -aG docker $USER newgrp docker Logout and log back in to apply the group change.

✅ Test Docker
Run this to confirm Docker is working properly:

bash
Copy
Edit
docker run hello-world
💡 Final Thoughts
Learning how to install Docker on Ubuntu is your first step into containerized development. Whether you're deploying web apps, managing microservices, or automating DevOps tasks, Docker gives you the flexibility and power to work efficiently.

Stay tuned for our next post where we’ll cover setting up Docker Compose on Ubuntu for multi-container applications!

Comments 0 total

    Add comment