How To Install Docker On Debian Linux [Latest]

How To Install Docker On Debian Linux [Latest]

How To Install Docker On Debian Linux [Latest]

In this tutorial post, we will show you the steps to download the latest version of Docker on Debian and its derivatives. Docker is already available in the default repository of Debian but they might not have the latest version of Docker.

How To Install The Latest Version Of Docker On Debian Linux [2023]

If you want to install the latest version of Docker on Debian based operating system then go through the following steps.

At first, remove the older version of Docker:

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

It’s an easy process. Run the following command at first to install the following packages:

sudo apt-get install ca-certificates curl gnupg lsb-release

Keyrings needs to be there by default but just in case if it’s not then run the following command to create /etc/apt/keyrings

sudo mkdir -p /etc/apt/keyrings

Now, it’s time to add GPG keys. Run the following command to add the GPG key for docker:

 curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

Now, it’s time to add the official Docker repo in your Debian based distros. Run the following command.

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

Now, it’s time to install Docker on Debian. Run the following command to install Docker on Debinan. It will install the most recent version of docker:

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

Just in case if you want to install the docker with the single command and doesn’t care the version of it then you can simply run the following command to install docker on Debian system:

sudo apt install docker.io
READ More Relevant Stuff:  Install Node.JS And NPM On Ubuntu

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *