I recently decided to learn more about docker, I did my research on how to install docker on Kali Linux and Debian, how to install images, how to delete images and many others. my learning curve was very fun and decided to write an article about it which in turn would help an individual have a basic understanding of Docker.

To get the article click on the download button below 

Here are the commands used in the article for you to copy and paste while installing docker 

Installing docker in kali linux

kali@kali:~$ sudo apt update

kali@kali:~$

kali@kali:~$ sudo apt install -y docker.io

kali@kali:~$

kali@kali:~$ sudo systemctl enable docker –now

kali@kali:~$

kali@kali:~$ docker

kali@kali:~$

– adding user to docker

kali@kali:~$ sudo usermod -aG docker $USER

Installing docker -ce in kali linux

Installing docker stable version 

kali@kali:~$ printf ‘%s\n’ “deb https://download.docker.com/linux/debian bullseye stable” | sudo tee /etc/apt/sources.list.d/docker-ce.list

import pgp key

kali@kali:~$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg –dearmor -o /etc/apt/trusted.gpg.d/docker-ce-archive-keyring.gpg

Install latest version of docker -ce

kali@kali:~$ sudo apt update

kali@kali:~$ sudo apt install -y docker-ce docker-ce-cli containerd.io

Installing docker in Debian

Uninstall docker old version

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

Installing using the repository

1. setting up the repository 

$ sudo apt-get update

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

 

2. adding docker official GPG file

$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg –dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

 

3. download stable repository 

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

 

Installing docker engine

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

Leave a Reply

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