Setting up Docker and Docker Compose on Linux Mint

less than 1 minute read

Published:

The following setup is for Linux Mint 21.1

Installation steps

  1. Setup the Docker’s apt repository
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
  1. Navigate as root to etc/apt/sources.list.d, and edit docker.list file.
  2. Replace vera with jammy. Save and exit the file.
  3. Do an update
    sudo apt-get update
    
  4. Install docker packages
    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
    
  5. Verify for correct installation
    sudo docker run hello-world
    
  6. Download the latest version of deb, and run
    sudo apt-get install ./docker-desktop-4.28.0-amd64.deb
    
  7. Launch Docker desktop from applications and check whether docker is running.

References:

  1. Install Docker Desktop on Ubuntu
  2. Install using the apt repository