Docker Installation on Ubuntu
If you're using Ubuntu, you should use the official Docker package, which is called docker-ce
(Docker Community Edition) for Ubuntu. Here's how you can install Docker on Ubuntu:
Update the package list:
sudo apt update
Install the required dependencies:
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
Add the Docker repository:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
This will add the official Docker repository for Ubuntu.
Update the package list again to include the Docker repository:
sudo apt update
Install Docker:
sudo apt install docker-ce
Start the Docker service and enable it to start on boot:
sudo systemctl start docker sudo systemctl enable docker
Verify that Docker is installed and running:
sudo docker --version
This process should install Docker on your Ubuntu system using the official Docker package. Remember that the package name may vary for different Linux distributions, so it's essential to use the appropriate package name for your distribution when installing Docker.
Subscribe to my newsletter
Read articles from Srikanth Pentapati directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by