PricingFAQ
Log inSign Up

How to install docker on Ubuntu

Tutorials

5 Aug 2025

How to install docker on Ubuntu

If you're new to Linux or servers and want to run applications in containers, Docker is one of the best tools out there. In this guide, I’ll walk you through how to install Docker on Ubuntu step-by-step — no advanced knowledge required.

What is Docker?

Docker lets you run apps in "containers", which are like mini virtual machines, but faster and lighter. It’s great for developers, sysadmins, and anyone managing software on servers.

What You’ll Need

  • A computer or VPS running Ubuntu 22.04 (or 20.04)
  • Access to the terminal (either directly or via SSH)
  • A user with sudo privileges (admin rights)

If you need an virtual server for Docker, check out nanohost.org. We offer fast and reliable servers starting at $8/month.

Step-by-Step Installation Guide

1. Update your system. 

Open the terminal and run:

sudo apt update && sudo apt upgrade -y

This makes sure everything is up to date.

2. Install required packages

You will needa a few extra tools to install Docker properly. Run:

sudo apt install ca-certificates curl gnupg lsb-release -y

3. Install Docker

Now for the main event:

curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh

Docker should start automatically. You can check with:

sudo systemctl status docker

4. Test if Docker works

Run the classic test:
docker run hello-world

You should see a message saying Docker is working.

You're Done!

Docker is now installed on your Ubuntu machine. You can start pulling and running containers from Docker Hub.

Bonus: Most common commands

docker pull ubuntu # Download an Ubuntu image

docker run -it ubuntu bash # Run Ubuntu container with interactive shell

docker ps # Show running containers

docker stop <id> # Stop a container

docker rm <id> # Remove a container

Summary

Installing Docker on Ubuntu is easier than it seems. Whether you're building apps, learning DevOps, or just exploring containers, Docker is an essential tool.

dockerhow-tolinux

Read also

How to Create an SSH Key in Linux (Easy Step-by-Step Guide)

How to Create an SSH Key in Linux (Easy Step-by-Step Guide)

Tutorials

Secure your server the right way! Learn how to generate and use SSH keys on Linux — a simple step-by-step guide for beginners.

How to Connect to a VPS Server via SSH (Step-by-Step)

How to Connect to a VPS Server via SSH (Step-by-Step)

Tutorials

New to VPS hosting? Learn how to connect to your server via SSH in under 5 minutes — step-by-step for beginners.

Creating a SOCKS5 Proxy Using Own VPS

Creating a SOCKS5 Proxy Using Own VPS

Tutorials

Need more privacy online or want to access content from another region? A SOCKS5 proxy is a simple way to route your internet traffic through a remote server. In this guide, we’ll show you how to create your own SOCKS5 proxy using a VPS and Docker — even if you’re not a technical expert.

Products

Server in the United StatesServer in the United KingdomServer in NetherlandsServer in SingaporeServer in Poland

NOVPS CLOUD LTD ©2025