Table of Contents
Introduction
This tutorial explains how to install Docker on Ubuntu 21.04, highlighting Docker as an efficient open platform for building, testing, and deploying applications. Docker simplifies and accelerates the deployment process, making it less time-consuming to build and test applications. The guide is ideal for anyone looking to streamline their development workflow using Docker on the Ubuntu system.
How to install Docker on Ubuntu
To install Docker on Ubuntu, you can follow these steps:
Prerequisites
- A system running Ubuntu 21.04
- A user account with sudo privileges
Step 1: Update your system
Update your existing packages:
sudo apt update
Step 2: Install the curl package
sudo apt install curl -y
Step 3: Download the Latest Docker Version
curl -fsSL https://get.docker.com -o get-docker.sh
Step 4: Install Docker
sh get-docker.sh
Step 5: To make sure that the current user can access the docker daemon
To avoid using sudo for docker activities, add your username to the Docker Group
sudo usermod -aG docker $USER
Step 6: Check Docker Version
To verify the installation, check the Docker version by command below:
docker --version
Uninstall Docker on Ubuntu
Check the package installed docker on Ubuntu.
dpkg -l | grep -i docker
Use the apt remove command to uninstall Docker on Ubuntu.
sudo apt-get purge docker-ce docker-ce-cli docker-ce-rootless-extras docker-scan-plugin
sudo rm -rf /var/lib/docker
Remove Software Dependencies
sudo apt autoremove
Link youtube:
Conclusion
How to install Docker on Ubuntu 21.04. After completing these steps, Docker should be successfully installed on your Ubuntu system, and you can start using Docker commands to manage containers and images. I hope will this your helpful. Thank you for reading the DevopsRoles page!
19 thoughts on “How to install Docker on Ubuntu”