Sarathlal N

Installing Docker on Linux Mint 20.x / Ubuntu (Jammy 22.04 / Impish 21.10 / Focal 20.04 / Bionic 18.04)

Uninstall old versions

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

If apt-get reports that none of these packages are installed, that means we havn’t installed Docker previously.

Installation

I prefer setting up Docker’s repository and install from that source for ease of installation and upgrade.

Set up the repository

  1. Update the apt package index

     sudo apt-get update
    
  2. Install required packages

     sudo apt-get install ca-certificates curl gnupg lsb-release
    
  3. Add Docker’s official GPG key

     sudo mkdir -p /etc/apt/keyrings
     curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    
  4. Set up the repository

Linux Mint 20.x

The Linux Mint 20.x is based on Ubuntu focal & we have to use it as source.

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu focal stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Ubuntu - Jammy 22.04 / Impish 21.10 / Focal 20.04 / Bionic 18.04

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Install Docker Engine

  1. Update the apt package index

     sudo apt-get update
    
  2. Install the latest version of Docker Engine, containerd, and Docker Compose.

     sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
    

Looking for a skilled WordPress/WooCommerce developer? I'm currently available for freelance, contract, or full-time remote opportunities! Let's create something amazing together. Send me a quick message, and I'll respond within 24 hours!

Recent Posts

  1. Automating Code Linting with GitHub Actions for WordPress Plugins
  2. Comprehensive Guide to Linting PHP, JavaScript, and CSS in WordPress Plugins Using Composer
  3. The Ultimate Guide to Indexing in Database Design
  4. Understanding 'update_meta_cache' in WordPress - When to Use It, When Not to, and Its Impact on Database Queries
  5. A Guide to Configuring JavaScript and SCSS Paths in WordPress Plugins with @wordpress/scripts

Your Questions / Comments

If you found this article interesting, found errors, or just want to discuss about it, please get in touch.