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.
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 runc2. 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.io4. Test the installation
sudo docker run hello-world5. Enable Docker to start on boot
sudo systemctl enable docker6. 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.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
