Cloud Native 3 min read

Step-by-Step Guide to Installing Docker on Ubuntu

This article provides a complete, step‑by‑step tutorial for uninstalling old Docker versions, configuring the APT repository, installing Docker Engine on Ubuntu, verifying the installation, enabling automatic start on boot, and setting up image acceleration.

Wukong Talks Architecture
Wukong Talks Architecture
Wukong Talks Architecture
Step-by-Step Guide to Installing Docker on Ubuntu

This guide explains how to install Docker Engine on an Ubuntu system, covering removal of previous Docker packages, repository configuration, installation of required components, verification of the installation, enabling Docker to start on boot, and optional image‑accelerator configuration.

1. Uninstall old Docker versions

sudo apt-get remove docker docker-engine docker.io containerd runc

2. Set up the Docker repository

$ sudo apt-get update

$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
sudo add-apt-repository \
    "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
    $(lsb_release -cs) \
    stable"

3. Install Docker Engine

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

4. Test the installation

sudo docker run hello-world

5. Enable Docker to start on boot

sudo systemctl enable docker

6. Configure image acceleration (optional)

Visit the Alibaba Cloud container image acceleration service at https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors for further configuration.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DevOpsContainerUbuntu
Wukong Talks Architecture
Written by

Wukong Talks Architecture

Explaining distributed systems and architecture through stories. Author of the "JVM Performance Tuning in Practice" column, open-source author of "Spring Cloud in Practice PassJava", and independently developed a PMP practice quiz mini-program.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.